Skip to content

Instantly share code, notes, and snippets.

@tauren
Created May 17, 2013 06:15
Show Gist options
  • Save tauren/5597259 to your computer and use it in GitHub Desktop.
Save tauren/5597259 to your computer and use it in GitHub Desktop.
Sails with middleware
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