Skip to content

Instantly share code, notes, and snippets.

@amosuro
Created November 5, 2018 12:32
Show Gist options
  • Save amosuro/16de7ea467bc36f0b28f9b51b86b36d8 to your computer and use it in GitHub Desktop.
Save amosuro/16de7ea467bc36f0b28f9b51b86b36d8 to your computer and use it in GitHub Desktop.
// 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