Skip to content

Instantly share code, notes, and snippets.

@avastou
Created October 23, 2012 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avastou/9b093bc687bf72a27fcf to your computer and use it in GitHub Desktop.
Save avastou/9b093bc687bf72a27fcf to your computer and use it in GitHub Desktop.
flatiron router
app.router.get('/testchain',function(next){
this.req.session['test'] = 'totot';
next();
}, function(next){
this.req.session['testA'] = 'tototA';
next();
}, function(next){
this.req.session['testB'] = 'tototB';
console.log(this.req.session);
this.res.writeHead(200, { 'Content-Type': 'text/json' })
this.res.json({ 'toto': 'titit' });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment