Uh oh!
There was an error while loading. Please reload this page.
npm start - process.env.PORT support - #117
Conversation
ghost
commented
Jul 23, 2016
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
tyrbo
commented
Jul 23, 2016
Would love it if the host was configurable as well. |
| console.log(chalk.green('Compiled successfully!')); | ||
| console.log(); | ||
| console.log('The app is running at http://localhost:3000/'); | ||
| console.log('The app is running at http://localhost:'+PORT+'/'); |
There was a problem hiding this comment.
If the minimum requirement is Node 4 can't we use template strings for these?
gaearon
commented
Jul 23, 2016
Can you please describe your use case for customizing the port? Do you want to run two instances of the app? Do you have another tool at this port? |
Yes. I have an express app at port 3000 behind a nginx proxy. If the react app wants to run on 3000 i would have to modify the nginx conf and the express app. |
gaearon
commented
Jul 23, 2016
dolchi21
commented
Jul 23, 2016
i think is just a matter of preference. i'm used to ExpressJS where you set env.PORT to whatever you like. |
mxstbr
commented
Jul 24, 2016
gaearon
commented
Jul 24, 2016
Yep. We might revisit this later. |
run "PORT=3001 npm start" to start the app at port 3001