How to get the app.locals object in express routing?

how do I get the app.locals object in express routing?
as follows,

router.get("/user/logout", (req, res) => {                
    delete req.session.user
    delete app.locals.user
    res.redirect("/")           
})

will report an error: there is no app.

Jan.21,2022

http://www.expressjs.com.cn/4.


req.app.get("")

get the properties mounted to app

in this way
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3deb5-2c3cb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3deb5-2c3cb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?