Skip to content

Instantly share code, notes, and snippets.

@devarajchidambaram
Created July 13, 2018 05:54
Show Gist options
  • Save devarajchidambaram/e0520177cfb36069bc769378867642ed to your computer and use it in GitHub Desktop.
Save devarajchidambaram/e0520177cfb36069bc769378867642ed to your computer and use it in GitHub Desktop.
SET environment variable in NODEJS
NODE_ENV works like any other environment variable (e.g. PATH) and it depends on your platform how to set it:
Linux and OSX: export NODE_ENV=production
Windows: SET NODE_ENV=production
In nodejs app we can get it
process.env.NODE_ENV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment