I use Node (latest version) + Express, also latest Version. I have 2 folders, public and secured. The secured folder should only be accessible after login.
I\'ve create
before your first app.use,
add something like
app.use(function(req, res, next) { if (req.url.match(/^\/secured\//)) { return requireLogin(req, res, next); } next(); })