Compare commits
2 Commits
b158635811
...
d5cbdd63e0
Author | SHA1 | Date | |
---|---|---|---|
d5cbdd63e0 | |||
e59caf0622 |
@ -4,6 +4,7 @@
|
|||||||
"description": "Rooster voor Het Heerenlanden om leerlingen te laten weten of ze binnen of buiten gym hebben",
|
"description": "Rooster voor Het Heerenlanden om leerlingen te laten weten of ze binnen of buiten gym hebben",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"body-parser": "^1.19.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"mustache-express": "^1.3.0",
|
"mustache-express": "^1.3.0",
|
||||||
"mysql": "^2.18.1"
|
"mysql": "^2.18.1"
|
||||||
|
@ -15,6 +15,8 @@ app.set('views', path.resolve('views/'));
|
|||||||
|
|
||||||
app.engine('mustache', mustacheExpress(path.resolve('views/partials/'), '.mustache'));
|
app.engine('mustache', mustacheExpress(path.resolve('views/partials/'), '.mustache'));
|
||||||
|
|
||||||
|
app.use(express.urlencoded());
|
||||||
|
|
||||||
var vars = {
|
var vars = {
|
||||||
username: 'ARN'
|
username: 'ARN'
|
||||||
}
|
}
|
||||||
@ -31,6 +33,11 @@ app.get('/login/', (req, res) => {
|
|||||||
res.render('login', vars);
|
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) =>
|
app.get('/scss/:file', (req, res) =>
|
||||||
res.sendFile(path.resolve('scss/' + req.params.file))
|
res.sendFile(path.resolve('scss/' + req.params.file))
|
||||||
);
|
);
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
{{> nav}}
|
{{> nav}}
|
||||||
<main>
|
<main>
|
||||||
<h1>Login</h1>
|
<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>
|
</main>
|
||||||
{{> footer}}
|
{{> footer}}
|
||||||
</body>
|
</body>
|
||||||
|
Reference in New Issue
Block a user