Search

3/16/2014

node environment

add to ~/.profile

export NODE_ENV=production   

then in node
> process.env.NODE_ENV
'production'

then in express
> app.get('env') //will be 'production'

or:
> NODE_ENV=production node server.js

沒有留言: