NODE_ENV

75 views
Skip to first unread message

tjholowaychuk

unread,
Aug 24, 2010, 4:33:40 PM8/24/10
to nodejs
Should mentioned this way back, but a small / important suggestion IMO
is that the node
web frameworks should support the NODE_ENV environ variable. Currently
bad examples are
SPARK_ENV, CONNECT_ENV, EXPRESS_ENV... what a clusterfuck! lol after
contributing to
this clusterfuck, I realized lets just have NODE_ENV :)

Guillermo suggested something like node --prod for production, or
maybe if we have a node --env flag.

Guillermo Rauch

unread,
Aug 24, 2010, 4:40:15 PM8/24/10
to nod...@googlegroups.com
Ryah mentioned on the IRC that he wanted a --dev option to run node with, and default to production mode which would make the process never crash[1] 

We could maybe have NODE_ENV to set this preference by default (although it could also be NODE_FLAGS and you could set more than just `--dev`), and then access it from the scripts with process.runMode (or similar).

[1] http://nodejs.debuggable.com/2010-07-30.txt "ryah: damn. we really need --dev for development mode and default to producion mode" "ryah: production mode = never crash"

--
Guillermo Rauch
http://devthought.com
Reply all
Reply to author
Forward
0 new messages