Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (12 sloc) 394 Bytes
nconf = require("nconf")
analytics = require("analytics-node")
env = process.env.NODE_ENV or "development"
nconf.use("memory")
.file({file: "config.#{env}.json"})
.defaults({
PORT: 8888,
})
analytics.init(config) if config = nconf.get("analytics")
unless host = nconf.get("host")
console.error "The 'host' option is required for Plunker to run."
process.exit(1)