We need to create our Contact
form now!
app.get('/contact', function(req, res){ res.render('contact'); });
- Let's save that and then inside the
views
folder, we'll create a new file and save it ascontact.pug
.
extends layout.pug block content .container form(method='post', action='contact/send') h1 Contact .form-group label Name input.form-control(type='text')
You want these to be on the same level, and this one is going to be Email
and we're going to give this one a type of email
. The code should now look like so:
extends layout...