Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simplified example configuration

  • Loading branch information...
commit 69aa0ffea55efbaa8a55988d87751da344c091b8 1 parent 3277929
@jarradseers authored
Showing with 3 additions and 7 deletions.
  1. +3 −7 examples/configuration/app.js
View
10 examples/configuration/app.js
@@ -25,15 +25,11 @@ var app = express();
load('configs').into(app);
/**
- * Configure for each environment.
+ * Configure for environment.
*/
-for (var environment in app.configs) {
- app.configure(environment, function() {
- for (var key in app.configs[environment]) {
- app.set(key, app.configs[environment][key]);
- }
- });
+for (var config in app.configs[app.get('env')]) {
+ app.set(config, app.configs[app.get('env')][config]);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.