From 11047b1859fceca6526a0b65159dd22c036f4be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Birm=C3=A9?= Date: Thu, 12 Dec 2024 11:16:31 +0100 Subject: [PATCH] fix: frontend was never served by service (#3) --- src/server.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/server.ts b/src/server.ts index bf9a471..a7f395f 100644 --- a/src/server.ts +++ b/src/server.ts @@ -1,6 +1,12 @@ +import fastifyStatic from '@fastify/static'; import api from './api'; +import path from 'path'; -const server = api({ title: '@eyevinn/typescript-nodejs' }); +const server = api({ title: 'AI Code Reviewer' }); +server.register(fastifyStatic, { + root: path.join(__dirname, '../out'), + prefix: '/' +}); const PORT = process.env.PORT ? Number(process.env.PORT) : 8000;