Wednesday 17 May 2017

How to access an existing middleware from another module

In my app.js, I have:

var express = require('express');
var cookieSession = require('cookie-session');
var app = express();
app.use(cookieSession({
  name: 'session',
  keys: ['******']
});

From another module, that is in another .js file, how do I get to read the session variables (which are encrypted by cookie-session?



via Old Geezer

No comments:

Post a Comment