We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I use a PORT environment variable to change the port of the server:
PORT
PORT=8000 npm start
I tried to put the following in .env:
PORT=8000
But when I run npm start, the default port (3000) is used. I was expecting the .env file to work in this case.
npm start
I understand the content of .env is to specify environment variables to be used in the app, but that's a bit confusing that the above doesn't work.
A workaround is to modify the package.json this way:
"start": "PORT=8000 react-scripts start",
But that'd be very nice if .env would work in a more intuitive way.
The text was updated successfully, but these errors were encountered:
.env has a notice about being available since 0.5.0. I think you are using 0.4.2 because I'm releasing 0.5.0 later today. :-)
Sorry, something went wrong.
Closing as fixed in 0.5.0. Please wait for the update in an hour or so.
0.5.0 has just been released. Can you give it a try?
See migration instructions and breaking changes in 0.5.0.
No branches or pull requests
I use a
PORT
environment variable to change the port of the server:I tried to put the following in .env:
But when I run
npm start
, the default port (3000) is used. I was expecting the .env file to work in this case.I understand the content of .env is to specify environment variables to be used in the app, but that's a bit confusing that the above doesn't work.
A workaround is to modify the package.json this way:
But that'd be very nice if .env would work in a more intuitive way.
The text was updated successfully, but these errors were encountered: