aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-10 21:19:24 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-10 21:19:24 +0200
commitcbe2f7c34822b1bd3b1f8c691f79f0c29cf21f07 (patch)
treece678124210db8b03b2a523e3b92a14cc403eeee /server.js
parentf1dae018681936b556b2496b7f2d872c004cfda3 (diff)
downloadPeerTube-cbe2f7c34822b1bd3b1f8c691f79f0c29cf21f07.tar.gz
PeerTube-cbe2f7c34822b1bd3b1f8c691f79f0c29cf21f07.tar.zst
PeerTube-cbe2f7c34822b1bd3b1f8c691f79f0c29cf21f07.zip
Refractoring and add thumbnails support (without tests)
Diffstat (limited to 'server.js')
-rw-r--r--server.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/server.js b/server.js
index 204cc146f..ef26ea773 100644
--- a/server.js
+++ b/server.js
@@ -75,6 +75,10 @@ app.use('/app/*', function (req, res, next) {
75 res.sendStatus(404) 75 res.sendStatus(404)
76}) 76})
77 77
78// Thumbnails path for express
79const thumbnails_physical_path = path.join(__dirname, config.get('storage.thumbnails'))
80app.use(constants.THUMBNAILS_STATIC_PATH, express.static(thumbnails_physical_path, { maxAge: 0 }))
81
78// Client application 82// Client application
79app.use('/*', function (req, res, next) { 83app.use('/*', function (req, res, next) {
80 res.sendFile(path.join(__dirname, 'client/index.html')) 84 res.sendFile(path.join(__dirname, 'client/index.html'))