fastify + qwik

This commit is contained in:
grngxd 2024-08-09 19:29:24 +01:00
commit f275c9bc5e

18
server/index.ts Normal file
View file

@ -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)
}