2 * Main application routes
7 var errors = require('./components/errors');
9 module.exports = function(app) {
11 // Insert routes below
12 app.use('/api/upload', require('./api/upload'));
13 app.use('/api/workspace', require('./api/workspace'));
14 app.use('/api/option', require('./api/option'));
15 app.use('/api/tagList', require('./api/tagList'));
16 app.use('/api/commandList', require('./api/commandList'));
18 // All undefined asset or api routes should return a 404
19 app.route('/:url(api|auth|components|app|bower_components|assets)/*')
22 // All other routes should redirect to the index.html
24 .get(function(req, res) {
25 res.sendfile(app.get('appPath') + '/index.html');