summaryrefslogtreecommitdiff
path: root/bin/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'bin/app.js')
-rwxr-xr-xbin/app.js31
1 files changed, 26 insertions, 5 deletions
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');