http-server
http-server copied to clipboard
Should Read PORT property from process.env.PORT
Environment Versions
- OS Type : MacOS
- Node version: v16.9.1
- http-server version: 14.0.0
Steps to reproduce
Before Running this script, I have already set env variable and verified that variable is accessble on process.env.PORT "local:prod": "npm run build && http-server ./build --cors",
Expected result
It should get the port number from process.env.PORT ...
Actual result
It automatically assigns a random PORT
...
Other information
How did you verify that process.env.PORT
is set correctly?
@thornjad
I checked it within my webpack config file.
console.log(process.env.PORT)
any solution to this problem how can I pass environment variables from a file?
This issue has been inactive for 180 days