Created
September 24, 2012 23:30
-
-
Save JonathanMH/3779100 to your computer and use it in GitHub Desktop.
all.js from locomotive-passport-boilerplate
This file contains hidden or 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
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