From 1b4692e70112e692de3c58a6e42d883a7b78e830 Mon Sep 17 00:00:00 2001 From: asyncnomi Date: Sun, 8 Jan 2023 23:43:02 +0100 Subject: [PATCH 1/2] bla --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 9a85c06..ecf834a 100644 --- a/index.js +++ b/index.js @@ -42,7 +42,7 @@ fastify.register(require('@fastify/static'), { }) fastify.get('/', async (request, reply) => { - reply.redirect('/index.html') + reply.send(fs.readFileSync('./static/index.html')); }) fastify.post('/login', async (request, reply) => { From a6b6fdcd50475c9cf211c56e7d26b83ca71d5b6f Mon Sep 17 00:00:00 2001 From: asyncnomi Date: Sun, 8 Jan 2023 23:44:49 +0100 Subject: [PATCH 2/2] bla --- index.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/index.js b/index.js index ecf834a..e9d860d 100644 --- a/index.js +++ b/index.js @@ -41,10 +41,6 @@ fastify.register(require('@fastify/static'), { decorateReply: false }) -fastify.get('/', async (request, reply) => { - reply.send(fs.readFileSync('./static/index.html')); -}) - fastify.post('/login', async (request, reply) => { let content = request.body; if (content.hasOwnProperty("user")