Created
October 26, 2018 15:10
-
-
Save laniltee/ad4a6f25e56106199a272c0e7f3e87ed to your computer and use it in GitHub Desktop.
Login page load
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
// Login Page Load | |
app.get('/', (req, res) => { | |
const sessionID = req.cookies['session-id']; | |
if (sessionID && SESSION_IDS[sessionID]) { | |
console.log("Login: Valid Session Found !"); | |
res.sendFile('views/form.html', {root: __dirname}); | |
} else { | |
console.log("Login: No Valid Session Found !"); | |
res.sendFile('views/login.html', {root: __dirname}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment