The node.js code I produced works fine, I just wanted to understand why app.use(passwordProtected) doesn't run when accessing the '/' endpoint, only runs for '/advanced-view'.
I would have thought because they are multiple asynchronous operations, the passwordProtected function would run for '/' as well:
app.get('/', function(req, res) { .... }
app.use(passwordProtected)
app.get('/advanced-view', function(req, res) { ... }
Thanks in advance for any help.