var index = require('./routes/index'); app.use('/', index); in your server.js / app.js then index.js that is in /routes/ directory : router.get('/', function (req, res) { // handle your route here }); module.exports = router;