silentarrowz/node-crud-api

Store port as env variable

microworlds opened this issue · 0 comments

Nice node API. It will be a good idea to store the port number as an environment variable. Look up this npm package dotenv. It saves you debugging when the code is production ready.
let port = process.env.PORT || 3000;