Created
November 5, 2018 12:32
-
-
Save amosuro/16de7ea467bc36f0b28f9b51b86b36d8 to your computer and use it in GitHub Desktop.
This file contains 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
// Our end-point for handling the enquiry request | |
app.post('/api/contact', (req, res, next) => { | |
return mailer.sendMail('[email protected]', ['[email protected]'], req.body) | |
.then(() => res.send(req.body)) | |
.catch(next); | |
}); | |
app.listen(port, () => console.log(`Listening on port ${port}`)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment