mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-02-07 13:59:01 +00:00
feat: persistent cache file & player pages on prod
This commit is contained in:
parent
235a1c56e1
commit
235988f3d3
@ -5,9 +5,10 @@ const config = require('./../config')
|
|||||||
|
|
||||||
routes.get('/file/:identifier', async (req, res) => {
|
routes.get('/file/:identifier', async (req, res) => {
|
||||||
// Uploads identifiers parsing, etc., are strictly handled by client-side JS at src/js/file.js
|
// 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', {
|
return res.render('file', {
|
||||||
config, utils, versions: utils.versionStrings
|
config, utils, versions: utils.versionStrings
|
||||||
})
|
}, !utils.devmode)
|
||||||
})
|
})
|
||||||
|
|
||||||
module.exports = routes
|
module.exports = routes
|
||||||
|
@ -5,9 +5,10 @@ const config = require('./../config')
|
|||||||
|
|
||||||
const playerHandler = async (req, res) => {
|
const playerHandler = async (req, res) => {
|
||||||
// Uploads identifiers parsing, etc., are strictly handled by client-side JS at src/js/player.js
|
// 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', {
|
return res.render('player', {
|
||||||
config, utils, versions: utils.versionStrings
|
config, utils, versions: utils.versionStrings
|
||||||
})
|
}, !utils.devmode)
|
||||||
}
|
}
|
||||||
|
|
||||||
routes.get('/player/:identifier', playerHandler)
|
routes.get('/player/:identifier', playerHandler)
|
||||||
|
Loading…
Reference in New Issue
Block a user