Added style to login.html, added place for username input
Created src/login.css Modified src/login.html Added username input
This commit is contained in:
@@ -71,8 +71,7 @@ wss.on('connection', function connection(ws) {
|
||||
|
||||
});
|
||||
|
||||
console.log(__dirname);
|
||||
app.use(express.static(__dirname));
|
||||
app.use('/', express.static(__dirname));
|
||||
app.use(bodyParser.urlencoded({ extended: true }));
|
||||
app.use(bodyParser.json());
|
||||
app.use(session({
|
||||
@@ -93,9 +92,10 @@ app.get("/", function (req, res) {
|
||||
app.post("/login", function (req, res)
|
||||
{
|
||||
const data = req.body;
|
||||
console.log(data);
|
||||
if(!data)
|
||||
res.sendStatus(400);
|
||||
console.log(data.password);
|
||||
|
||||
if(data.password == settings.password)
|
||||
req.session.logged = true;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user