coffee-express
Version:
A Template for NodeJs Application using Express, CoffeeScript, Jade, and Stylus.
25 lines (22 loc) • 687 B
text/coffeescript
#### Config file
# Sets application config parameters depending on `env` name
exports.setEnvironment = (env) ->
console.log "set app environment: #{env}"
switch(env)
when "development"
exports.DEBUG_LOG = true
exports.DEBUG_WARN = true
exports.DEBUG_ERROR = true
exports.DEBUG_CLIENT = true
when "testing"
exports.DEBUG_LOG = true
exports.DEBUG_WARN = true
exports.DEBUG_ERROR = true
exports.DEBUG_CLIENT = true
when "production"
exports.DEBUG_LOG = false
exports.DEBUG_WARN = false
exports.DEBUG_ERROR = true
exports.DEBUG_CLIENT = false
else
console.log "environment #{env} not found"