spee.ch/routes/home-routes.js
2018-01-31 19:21:00 -08:00

11 lines
311 B
JavaScript

module.exports = app => {
// route for the home page
app.get('/', (req, res) => {
res.status(200).render('index');
});
// a catch-all route if someone visits a page that does not exist
app.use('*', ({ originalUrl, ip }, res) => {
// send response
res.status(404).render('index');
});
};