August 2016
Intermediate to advanced
376 pages
6h 33m
English
At this time, we have to do a major restructuring of the app.js file to include the new middleware that we will use.
We will show you step by step how to include each middleware and at the end, we will see the complete file:
app.js and add the following lines before var app = express(): // ODM With Mongoose
var mongoose = require('mongoose');
// Modules to store session
var session = require('express-session');
var MongoStore = require('connect-mongo')(session);
// Import Passport and Warning flash modules
var passport = require('passport');
var flash = require('connect-flash');
This is a simple import process.
app.set('view ...Read now
Unlock full access