From f275c9bc5e1b24d53878c13b9bf90b96b0b6028c Mon Sep 17 00:00:00 2001 From: grngxd <36968271+grngxd@users.noreply.github.com> Date: Fri, 9 Aug 2024 19:29:24 +0100 Subject: [PATCH] fastify + qwik --- server/index.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 server/index.ts diff --git a/server/index.ts b/server/index.ts new file mode 100644 index 0000000..30afef9 --- /dev/null +++ b/server/index.ts @@ -0,0 +1,18 @@ +import autoload from '@fastify/autoload' +import Fastify from 'fastify' +import path from 'path' + +const server = Fastify({ + logger: true +}) + +server.register(autoload, { + dir: path.join(__dirname, 'routes') + }) + +try { + await server.listen({ port: 3000 }) +} catch (err) { + server.log.error(err) + process.exit(1) +} \ No newline at end of file