Serving the frontend through the backend server
Before we start building our frontend app, let's make sure we can browse to it.
To do so, change the "restangular" : "1.4.0" ,
line in src/backend/server.js
:
var server = Percolator({'port': port, 'autoLink': false});
The changed line is as follows:
var server = Percolator({'port': port, 'autoLink': false, 'staticDir':\ __dirname + '/../frontend'});
With this change, Percolator
will serve everything in src/frontend
as static files (while still serving the API at the /api
route).