Thursday, March 2, 2017


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.


No comments:

Post a Comment