Skip to content
Myr

Added secret to session middleware used in examples and generated app

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 79ba787 · Browse files · 6 files+6 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

6 files+6 added−6 removed

  • other:+6 added−6 removed

6 files+6 added−6 removed

modified:bin/express+1 added-1 removed
339 unmodified lines
340 }341342 // Session support343 app = app.replace('{sess}', sessions344 ? '\n app.use(express.cookieDecoder());\n app.use(express.session());'344 ? '\n app.use(express.cookieDecoder());\n app.use(express.session({ secret: \'your secret here\'}));'345 : '');346347 // Template support348 app = app.replace(':TEMPLATE', templateEngine);
98 unmodified lines
modified:examples/auth/app.js+1 added-1 removed
modified:examples/blog/app.js+1 added-1 removed
modified:examples/flash/app.js+1 added-1 removed
10 unmodified lines
11// App with session support1213var app = express.createServer(14 express.cookieDecoder()15 , express.session()15 , express.session({ secret: 'keyboard cat' })16);1718// View settings19
59 unmodified lines
modified:examples/form/app.js+1 added-1 removed
21 unmodified lines
22app.use(express.cookieDecoder());2324// Required by req.flash() for persistent25// notifications26app.use(express.session());26app.use(express.session({ secret: 'keyboard cat' }));2728app.get('/', function(req, res){29 // get ?name=foo30 var name = req.param('name') || '';
49 unmodified lines
modified:examples/mvc/mvc.js+1 added-1 removed
16 unmodified lines
17 app.use(express.logger({ format: ':method :url :status' }));18 app.use(express.bodyDecoder());19 app.use(express.methodOverride());20 app.use(express.cookieDecoder());21 app.use(express.session());21 app.use(express.session({ secret: 'keyboard cat' }));22 app.use(app.router);23 app.use(express.staticProvider(__dirname + '/public'));2425 // Example 500 page
123 unmodified lines