diff options
-rw-r--r-- | app.js | 4 | ||||
-rw-r--r-- | config.js | 5 |
2 files changed, 9 insertions, 0 deletions
@@ -42,6 +42,10 @@ glob.sync('./routes/**/*.js').forEach(function(file) { app.use('/api/v1', router); +// set up serving of static frontend files +app.use('/', express.static(config.frontend_path)); + + var server = app.listen(config.port, function() { var host = server.address().address; var port = server.address().port; @@ -17,3 +17,8 @@ exports.dburi = 'mongodb://localhost/rvs'; * https://github.com/expressjs/session#secret */ exports.session_secret = 'Very safe. Much secret. Wow.'; + +/** + * Path to the static files of the frontend. + */ +exports.frontend_path = '../RVS-frontend'; |