Removed holiday content; Fixed minor bugs; Started to add login code (moved to another project).

This commit is contained in:
Wynne Crisman
2016-02-04 13:29:55 -08:00
parent c93f19654e
commit 2ba994e7f2
6 changed files with 23 additions and 10 deletions

18
app.js
View File

@@ -11,18 +11,30 @@ var fs = require('fs');
var rootPath = path.join(__dirname, 'public');
var config = require('./config');
var moment = require('moment');
var methodOverride = require("method-override");
var session = require("express-session");
var passport = require("passport");
var localStrategy = require("passport-local");
var app = express();
app.use(bodyParser.urlencoded({extended: false}));
//app.use(favicon(__dirname + '/public/images/AV4H.ico'));
app.use(logger('dev'));
app.use(cookieParser());
app.use(bodyParser.urlencoded({extended: false}));
app.use(bodyParser.json());
app.use(methodOverride('X-HTTP-Method-Override'));
app.use(session({secret: 'au*2(_io?MajesticPeakMountainBoarding', saveUninitialized: true, resave: true}));
app.use(passport.initialize());
app.use(passport.session());
app.use(favicon(__dirname + '/public/images/Chicken.ico'));
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(require('stylus').middleware(path.join(__dirname, 'public')));
//Ensure we have an endsWith method in String.
String.prototype.endsWith = function(suffix) {
return this.indexOf(suffix, this.length - suffix.length) !== -1;