Skip to content

Instantly share code, notes, and snippets.

@JonathanMH
Created September 24, 2012 23:30
Show Gist options
  • Save JonathanMH/3779100 to your computer and use it in GitHub Desktop.
Save JonathanMH/3779100 to your computer and use it in GitHub Desktop.
all.js from locomotive-passport-boilerplate
var express = require('express');
var passport = require('passport');
var mongoose = require('mongoose');
var mongoStore = require('connect-mongodb');
module.exports = function() {
this.set('views', __dirname + '/../../app/views');
this.set('view engine', 'jade');
this.use(express.logger());
this.use(express.cookieParser());
this.use(express.bodyParser());
/*this.use(express.session({
secret: 'secret',
store: new mongoStore({db: mongoose.connection.db})
}));*/
this.use(passport.initialize());
this.use(passport.session());
this.use(this.router);
this.use(express.static(__dirname + '/../../public'));
//this.datastore(require('locomotive-mongoose'));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment