feat: persistent cache file & player pages on prod

This commit is contained in:
Bobby Wibowo 2022-07-25 07:40:00 +07:00
parent 235a1c56e1
commit 235988f3d3
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF
2 changed files with 4 additions and 2 deletions

View File

@ -5,9 +5,10 @@ const config = require('./../config')
routes.get('/file/:identifier', async (req, res) => {
// Uploads identifiers parsing, etc., are strictly handled by client-side JS at src/js/file.js
// Rendered page is persistently cached during production (its dynamic content is generated on client-side)
return res.render('file', {
config, utils, versions: utils.versionStrings
})
}, !utils.devmode)
})
module.exports = routes

View File

@ -5,9 +5,10 @@ const config = require('./../config')
const playerHandler = async (req, res) => {
// Uploads identifiers parsing, etc., are strictly handled by client-side JS at src/js/player.js
// Rendered page is persistently cached during production (its dynamic content is generated on client-side)
return res.render('player', {
config, utils, versions: utils.versionStrings
})
}, !utils.devmode)
}
routes.get('/player/:identifier', playerHandler)