var express = require ('express'); function getRoutes (req, res) { var routes = require ('./build/salix.routes.json'); res.send (JSON.stringify (routes)); } function getDefault (res, res) { res.sendStatus (404); } function onListen () { console.log ('HTTP server started.'); } var app = express (); app.get ('/routes.json', getRoutes); app.all (/.*/, getDefault); app.listen (8080, onListen);