This is middleware that needs to be applied on the node server which checks if the session includes a userId, if so, the user is logged in, otherwise give them an error. This middleware needs to be applied on all routes except for paths: /, /login, and /register
This is middleware that needs to be applied on the node server which checks if the session includes a userId, if so, the user is logged in, otherwise give them an error. This middleware needs to be applied on all routes except for paths:
/
,/login
, and/register