Serve videos too
This commit is contained in:
parent
16841a8a5c
commit
0ecb26187f
4 changed files with 6 additions and 1 deletions
|
@ -17,5 +17,6 @@ RUN npm install --only=production
|
|||
|
||||
# Map the volumes
|
||||
VOLUME /var/infoscreens/dist
|
||||
VOLUME /var/infoscreens/videos
|
||||
|
||||
CMD npm start
|
||||
|
|
|
@ -13,3 +13,4 @@ services:
|
|||
- mqtt-infoscreens
|
||||
volumes:
|
||||
- ./dist:/var/infoscreens/dist
|
||||
- ./videos:/var/infoscreens/videos
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
"isomorphic-fetch": "^2.2.1",
|
||||
"koa": "^2.6.2",
|
||||
"koa-cors": "0.0.16",
|
||||
"koa-mount": "^4.0.0",
|
||||
"koa-router": "^7.4.0",
|
||||
"koa-static": "^5.0.0",
|
||||
"msgflo-browser": "^0.2.0",
|
||||
|
|
|
@ -2,6 +2,7 @@ const Koa = require('koa');
|
|||
const Router = require('koa-router');
|
||||
const Static = require('koa-static');
|
||||
const Cors = require('koa-cors');
|
||||
const Mount = require('koa-mount');
|
||||
const path = require('path');
|
||||
|
||||
const route35c3 = require('./route/35c3');
|
||||
|
@ -15,7 +16,8 @@ app
|
|||
.use(Cors())
|
||||
.use(router.routes())
|
||||
.use(router.allowedMethods())
|
||||
.use(Static(path.resolve(__dirname, '../dist'), {}));
|
||||
.use(Static(path.resolve(__dirname, '../dist'), {}))
|
||||
.use(Mount('/videos', Static(path.resolve(__dirname, '../videos'), {})));
|
||||
|
||||
module.exports = app;
|
||||
if (!module.parent) {
|
||||
|
|
Loading…
Reference in a new issue