diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-05-10 21:19:24 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-05-10 21:19:24 +0200 |
commit | cbe2f7c34822b1bd3b1f8c691f79f0c29cf21f07 (patch) | |
tree | ce678124210db8b03b2a523e3b92a14cc403eeee /server.js | |
parent | f1dae018681936b556b2496b7f2d872c004cfda3 (diff) | |
download | PeerTube-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.js | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 | ||
79 | const thumbnails_physical_path = path.join(__dirname, config.get('storage.thumbnails')) | ||
80 | app.use(constants.THUMBNAILS_STATIC_PATH, express.static(thumbnails_physical_path, { maxAge: 0 })) | ||
81 | |||
78 | // Client application | 82 | // Client application |
79 | app.use('/*', function (req, res, next) { | 83 | app.use('/*', function (req, res, next) { |
80 | res.sendFile(path.join(__dirname, 'client/index.html')) | 84 | res.sendFile(path.join(__dirname, 'client/index.html')) |