Created
June 2, 2020 06:48
-
-
Save parzibyte/3dfcbb12b5375e894a71d919d4b6eb52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get("/ruta_solo_logueados", (req, res) => { | |
// Si, por ejemplo, no hay nombre | |
if(!req.session.nombre){ | |
res.end("No tienes permiso. Fuera de aquí"); | |
}else{ | |
// Ok, el usuario tiene permiso | |
res.end("Hola " + req.session.nombre); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment