Skip to content

Instantly share code, notes, and snippets.

@fillano
Created August 13, 2012 12:02
Show Gist options
  • Save fillano/3340046 to your computer and use it in GitHub Desktop.
Save fillano/3340046 to your computer and use it in GitHub Desktop.
test cookie and res.redirect()
var express = require('express');
var app = express();
app.get('/', function(req, res) {
res.cookie('test', '123456');
res.cookie('test', '0');
res.redirect('/a');
});
app.get('/a', function(req, res) {
res.send('hello cookie test');
});
app.listen(3000);
console.log('listen on port 3000');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment