Commit 0bf688e8 authored by Frauke's avatar Frauke

Added extra route for sign in

parent 4124667e
......@@ -7,13 +7,8 @@
<title>Document</title>
</head>
<body>
<h1>Welcome to Igent</h1>
<p>Please sign in on your website</p>
<form action="sign-in" method="post" id="sign-in">
<label for="password">Password</label>
<input type="password" name="password" id="password">
<input type="submit" value="Create site">
</form>
<h1>Welcome to my.gent</h1>
<p>This is my personal space</p>
<script src="js/vendor/OpenCrypto.js"></script>
<script src="js/script.js"></script>
</body>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<h1>Welcome to Igent</h1>
<p>Please sign in on your website</p>
<form action="sign-in" method="post" id="sign-in">
<label for="password">Password</label>
<input type="password" name="password" id="password">
<input type="submit" value="Create site">
</form>
<script src="js/vendor/OpenCrypto.js"></script>
<script src="js/script.js"></script>
</body>
</html>
const fs = require('fs')
const express = require('express')
const app = express()
const path = require('path')
......@@ -10,6 +9,14 @@ app.use(express.static(path.join(__dirname, '../public')))
app.use(bodyParser.json())
app.use(bodyParser.urlencoded({extended: false}))
app.get('/sign-in', (req, res) => {
res.status(200).sendFile(path.join(__dirname, '../public/sign-in.html'))
})
app.post('/sign-in', (req, res) => {
// TODO: Sign in
})
app.get('/register', (req, res) => {
res.status(200).sendFile(path.join(__dirname, '../public/register.html'))
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment