Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //fetching all routes files.
- var api = require('./api');
- var routes = function(app) {
- app.get('/', function(req, res) {
- res.render('index');
- });
- app.get('/partials/:name', function(req, res) {
- var name = req.params.name;
- res.render('view/' + name);
- });
- //Initilizing routes
- api(app);
- // redirect all others to the index (HTML5 history)
- app.get('*', function(req, res) {
- res.render('index');
- });
- };
- module.exports = routes;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement