javascript - can't make flash working -


I am developing an application with nodes, express 3.4.1 and passport 0.1.17, all is well, Except I can not do Req.flash, I've read many posts, they have advised me that support for Flash has been removed since the Express 3 and should use Connect-Flash, notice that Where used in my server, but nothing is working, here Wpuarn share my server.js:

  var flash = require ( 'connect-Flash'); Var Express = Required ('Express'), path = is required ('path'), fs = is required ('fs'); Var passport = requirement ('passport'); Var neo = Required ('neo4j'); Var db = new neo.GraphDatabase ('http: // localhost: 7474'); Var neoDb = New neo.GraphDatabase ('http: // localhost: 7474'); Var app = express (); // bootstrap model var modelpath = path.joined (__derename, 'bb / model'); Fs.readdirSync (modelpath) .for eca (function (file) {requirement (modelpath + '/' + file);}); // Arrange blank DB with dummy data //require('./lib/db/dummydata '); // Controller var api = Required ('. / Lib / controller / API'); // Express Configuration App Configuration (function () (use. (Usage ('/ media', Express.stitic (__Dynaman + '/ Media')); Application Uses (Express. Static (__DERNAM + '/ Public')); APY (Express.Logger ('Dev')); App Use (Express.BPers ()); App Usage (XPMDoOverride ()); //app.use (Express.Static ("Public")); / For authentication app, use .exe (express cookieParser ()); // read cookies (required for ATH) app (express.bodyParser ()); // information from html forms. Set up. (Set the ejs for the required templates for the passport app. (Flash ()); // Use- op- Flash messages are stored in the session app. Usage (Express op ( (Secret: 'bubala'}); // session secret app use (passport internalize); app usage (passport session); // continuous login session};);  

I am thinking about switching to angular, but what is uncertain if it is from EJS If switching is understandable, then what is the best way for the user to flash messages?


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -