YouAndWeb_TwoToc
a98e8d4c8be3c9266abcdd007f47a6b1c3ed9599
YouAndWeb_TwoToc / .fr-KzWVa7 / twotoc / server / routes.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
/** * Main application routes */ 'use strict'; var errors = require('./components/errors'); var path = require('path'); module.exports = function(app) { // Insert routes below app.use('/api/comments', require('./api/comment')); app.use('/api/categories', require('./api/category')); app.use('/api/shows', require('./api/show')); app.use('/api/test', require('./api/message')); app.use('/api/users', require('./api/user')); app.use('/auth', require('./auth')); // 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.sendFile(path.resolve(app.get('appPath') + '/index.html')); }); }; |
Commits for YouAndWeb_TwoToc/.fr-KzWVa7/twotoc/server/routes.js
Revision | Author | Commited | Message |
---|---|---|---|
a98e8d ... | FSinnona | Thu 26 Nov, 2015 13:26:45 +0000 | Creazione organizza |