Previous commits need to be merged
This commit is contained in:
parent
63b58a8242
commit
e59caf0622
@ -4,6 +4,7 @@
|
||||
"description": "Rooster voor Het Heerenlanden om leerlingen te laten weten of ze binnen of buiten gym hebben",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"body-parser": "^1.19.0",
|
||||
"express": "^4.17.1",
|
||||
"mustache-express": "^1.3.0",
|
||||
"mysql": "^2.18.1"
|
||||
|
@ -15,6 +15,8 @@ app.set('views', path.resolve('views/'));
|
||||
|
||||
app.engine('mustache', mustacheExpress(path.resolve('views/partials/'), '.mustache'));
|
||||
|
||||
app.use(express.urlencoded());
|
||||
|
||||
var vars = {
|
||||
username: 'ARN'
|
||||
}
|
||||
@ -31,6 +33,11 @@ app.get('/login/', (req, res) => {
|
||||
res.render('login', vars);
|
||||
});
|
||||
|
||||
app.post('/login', (req, res) => {
|
||||
console.log(req.body)
|
||||
res.send('login attempt using the following credentials:');
|
||||
});
|
||||
|
||||
app.get('/scss/:file', (req, res) =>
|
||||
res.sendFile(path.resolve('scss/' + req.params.file))
|
||||
);
|
||||
|
@ -5,6 +5,11 @@
|
||||
{{> nav}}
|
||||
<main>
|
||||
<h1>Login</h1>
|
||||
<form method="post" action="#">
|
||||
<input placeholder="Gebruikersnaam" type="text" name="username">
|
||||
<input placeholder="Wachtwoord" type="text" name="password">
|
||||
<button type="submit">Inloggen</button>
|
||||
</form>
|
||||
</main>
|
||||
{{> footer}}
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user