Just setting up the application. If you change route.js from:
app.get('/articles', articles.all);
to
app.get('/articles', auth.requiresLogin, articles.all);
Then, if you try to click url / articles immediately, you will get a message:
"User not logged in"
Instead of JSON, all articles are listed.
source share