Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get environment variables in node js

console.log(app.get('env'))

if(app.get('env').toLowerCase()==="development"){
    app.use(morgan("dev"))
}
 
PREVIOUS NEXT
Tagged: #environment #variables #node #js
ADD COMMENT
Topic
Name
2+7 =