I have req.session values that are being stored upon login. But what I want to do is access them on every page of my app (front-end(ejs)), but i don't want to go into every single route/function i have and pass it. So i was wondering if there is a universal way to pass req.session to the front-end from one route and access them on all pages?
my routes look like this:
app.get('/', (req, res) => {
res.render("index.ejs");
})
sorry if this is an odd question, but wondering if there is universal ways to do things like this.