diff options
author | dennisschagt <dennisschagt@gmail.com> | 2015-05-07 02:05:29 +0200 |
---|---|---|
committer | dennisschagt <dennisschagt@gmail.com> | 2015-05-07 02:05:29 +0200 |
commit | c4152b00d6005e33c4250493e7ebe762737c16f2 (patch) | |
tree | baf16a0fc24c0e89f7f485baeda92e127b064420 | |
parent | 5cb8b8c246d8f87fcb3f70a73693e05e651362b3 (diff) | |
download | n-c4152b00d6005e33c4250493e7ebe762737c16f2.tar.gz |
Serve static frontend files
-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'; |