routes.js 501 B

123456789101112131415161718
  1. var express = require('express');
  2. var app = express();
  3. // Load Express Configuration
  4. require('./expressConfig')(app, express);
  5. // Root route
  6. app.get('/', function(req, res){
  7. res.sendfile('index.html', {root: app.settings.views});
  8. });
  9. // Load routes
  10. require('./routes/user')(app); //user routes
  11. require('./routes/session')(app); // session routes, mostly for authentication
  12. require('./routes/note')(app); // note routes
  13. require('./routes/category')(app); // category routes
  14. module.exports = app;