Is it possible to secure the entire app on Node JS instead of applying it to each page?

Would it be possible to secure an entire application in Node JS by applying the server action to the layout instead of the page? It didn’t seem to work when I tried it, I just wanted to confirm this. I followed the “Applying Security to your NodeJS pages” tutorial.

If theres a better way to secure an entire application rather than applying the server action to each page I’d be happy to hear about it!

Community Page
Last updated: