Skip to content

Instantly share code, notes, and snippets.

/gist:3616932
Created Sep 4, 2012

Embed
What would you like to do?
Using Express Framework
// app.js File
...
app.post('/sender', function(req, res, next) {
console.log(req.body);
console.log(req.body.name);
console.log(req.body.message);
console.log(req.body.email);
res.redirect('back');
})
...
// contact.jade File
form(method='post', action='/sender')
input(type='text', name='name', placeholder='Name')
input(type='email', name='email', placeholder='Email')
input(type='text', name='message', placeholder='Message')
input(type='submit', name='submit')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.