Files
web-cad/backend/src/index.ts
T

19 lines
365 B
TypeScript

import fastify from 'fastify'
const app = fastify({ logger: true })
app.get('/api/health', async (request, reply) => {
return { status: 'OK' }
})
const start = async () => {
try {
await app.listen({ port: 3001, host: '0.0.0.0' })
console.log('Server listening on port 3001')
} catch (err) {
app.log.error(err)
process.exit(1)
}
}
start()