Skip to content

Instantly share code, notes, and snippets.

@hokaccha
Created March 5, 2013 09:16
Show Gist options
  • Save hokaccha/5088996 to your computer and use it in GitHub Desktop.
Save hokaccha/5088996 to your computer and use it in GitHub Desktop.
GRP test2
var express = require('express');
var http = require('http');
var app = express();
app.get('/', function(req, res) {
res.send(
'<body>' +
'<form action="/a" method="POST">' +
'<input type="text" name="foo">' +
'<input type="submit">' +
'</form>'
);
});
app.post('/a', function(req, res) {
res.redirect('/a');
});
app.get('/a', function(req, res) {
res.send('a');
});
http.createServer(app).listen(3030);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment