Skip to content

Instantly share code, notes, and snippets.

@draco2003
Last active December 26, 2015 06:58
Show Gist options
  • Save draco2003/7111327 to your computer and use it in GitHub Desktop.
Save draco2003/7111327 to your computer and use it in GitHub Desktop.
Simple example express app that posts input field as empty string
var express = require('express')
, app = express();
app.use(express.bodyParser())
.get('/', function(req, res){
res.send('<form action="/" method="POST"><input type="text" name="test"><input type="submit" value="Submit"></form>');
})
.post('/', function(req, res){
res.send(req.body);
}).listen(3003);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment