From 4d73eb92cbc135850e20b2390698105ff8edf3cd Mon Sep 17 00:00:00 2001 From: yo mama Date: Fri, 5 Dec 2014 19:46:45 -0800 Subject: waiting until everyauth is updated --- bin/app.js | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'bin/app.js') diff --git a/bin/app.js b/bin/app.js index 1d4ca61..eeec8d5 100755 --- a/bin/app.js +++ b/bin/app.js @@ -7,20 +7,41 @@ var express = require('express'), bodyParser = require('body-parser'), cookieSession = require('cookie-session'); var config = require('../config/main'); - +var everyauth = require('everyauth'); + var app = express(); app.use(morgan('combined')); -app.use(bodyParser.json()); // for parsing application/json app.use(multer({inMemory: true})); -app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded app.use(expressValidator()); -app.use(cookieParser()); -app.use(cookieSession({secret: 'app_1'})); +app.use(bodyParser.json()); // for parsing application/json +app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded +app.use(cookieParser('some secret')); +app.use(express.session()); +app.use(everyauth.middleware(app)); +//app.use(cookieSession({secret: 'app_1'})); app.use(express.static('../public')); app.use(express.static('../public/vendor')); //app.use(express.favicon(__dirname + '/public/images/shortcut-icon.png')); //app.use(messages()); +//Important - Some OAuth Providers do not allow callbacks to localhost, +// so you will need to create a localhost alias called local.host. Make +// sure you set up your /etc/hosts so that 127.0.0.1 is also associated +//with 'local.host'. So inside your /etc/hosts file, +// one of the lines will look like: +// +//127.0.0.1 localhost local.host +//ABORT ABORT +//this project needs to be updated to not use connect +//CONTINUE LATER...for the time being use passport +// +// +// +// + +// + + app.set('view engine', 'ejs'); app.set('views', 'views'); -- cgit v1.2.3-70-g09d2