How to set verification of session for all routes?
if(req.session.lang) req.session.lang
else req.session.lang = "pt";
const tradutor = require('../scripts/lang/lang-'+req.session.lang+'');
var traduPT = new tradutor();
this is my code. i want use for check in all routes, maybe something like adding the code and just applying the request on the routes, but how and where to do this code outside the routes?