Thursday, March 2, 2017

process.env.POST

In Nodejs, you can see the code like this
the port is either process.env.PORT or 3000.
The "process.evn.PORT" can be passed in by command line argument. For example:
now the port is 4444.

Sometimes the setting may be env specific, e.g. database URL. Here is one solution.
https://gist.github.com/wilsonbalderrama/0ad2b64b5ab6287c7318

config.js

No comments:

Post a Comment