routes.js 272 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 var path = require('path'); var api = require('./routes/api'); module.exports = function (app) { app.use('/api/', api); app.get('*', function (req, res) { res.sendFile('public/views/index.html', { root: path.normalize(__dirname + '/..') }); }); };