Created
March 31, 2015 13:19
-
-
Save matthewrevell/1e69e963fc2c0153aedf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Let's create a simple home page that has a form | |
// The form will POST to the same location | |
app.get('/', function(req, res){ | |
var html = '<form action="/" method="post">' + | |
'What is your name:' + | |
'<input type="text" name="userName" />' + | |
'<br>' + | |
'Where do you live?' + | |
'<input type="text" name="location" />' + | |
'<br>' + | |
'<button type="submit">Submit</button>' + | |
'</form>'; | |
res.send(html); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment