Created
May 17, 2013 06:15
-
-
Save tauren/5597259 to your computer and use it in GitHub Desktop.
Sails with middleware
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
// Name of the application (used as default <title>) | |
appName: "Sails Application", | |
// Port this Sails application will live on | |
port: 1337, | |
// The environment the app is deployed in | |
// (`development` or `production`) | |
// | |
// In `production` mode, all css and js are bundled up and minified | |
// And your views and templates are cached in-memory. Gzip is also used. | |
// The downside? Harder to debug, and the server takes longer to start. | |
environment: 'development', | |
// Logger | |
// Valid `level` configs: | |
// | |
// - error | |
// - warn | |
// - debug | |
// - info | |
// - verbose | |
// | |
log: { | |
level: 'verbose' | |
}, | |
// Custom express middleware - we use this to register the passport middleware | |
express: { | |
customMiddleware: function(app) | |
{ | |
app.use(passport.initialize()); | |
app.use(passport.session()); | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment