Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // all environments
- app.configure(function()
- {
- app.use(express.static(__dirname + '/public'));
- // ...
- });
- // NODE_ENV=development only
- app.configure('development', function()
- {
- app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
- // ...
- });
- // NODE_ENV=production only
- app.configure('production', function()
- {
- app.use(express.errorHandler());
- // ...
- });
- app.configure('development', function() {
- // configure stuff here
- });
- // becomes
- var env = process.env.NODE_ENV || 'development';
- if ('development' == env) {
- // configure stuff here
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement