mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-30 09:16:23 +02:00
First Commit
This commit is contained in:
commit
2630cc237a
527 changed files with 104273 additions and 0 deletions
25
config/routes.js
Normal file
25
config/routes.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
module.exports = function(app) {
|
||||
|
||||
// Insert routes below
|
||||
app.use('/api/event', require('../api/event'));
|
||||
|
||||
// All undefined asset or api routes should return a 404
|
||||
// app.route('/:url(api|auth|components|app|bower_components|assets)/*')
|
||||
// .get(errors[404]);
|
||||
|
||||
// All other routes should redirect to the index.html
|
||||
app.route('/*')
|
||||
.get(function(req, res) {
|
||||
res.render('index.ejs');
|
||||
});
|
||||
|
||||
if (app.get('env') === 'development') {
|
||||
app.use(function(err, req, res, next) {
|
||||
res.status(err.status || 500);
|
||||
res.render('error.ejs', {
|
||||
message: err.message,
|
||||
error: err
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue