I have a route.js which looks like this:
module.exports = function(app) { app.get(\'/tip\', function(req, res) { res.render(\"tip\"); }); app.get
It's work on my project
routesPath = path.join(__dirname, 'routes'); fs.readdirSync(routesPath).forEach(function(file) { require(routesPath + '/' + file)(app); });