Clear History

This commit is contained in:
2023-05-11 17:44:13 +02:00
commit 4acb9b9ae8
77 changed files with 5363 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import Fastify from 'fastify'
const app = Fastify({ logger: { base: false } })
app.post('/transmit', async (request) => {
request.log.info({ data: request.body })
})
app.get('/time', async () => {
return new Date().toISOString()
})
try {
process.on('SIGINT', () => app.close())
process.on('SIGTERM', () => app.close())
await app.listen({ port: 3000, host: '0.0.0.0' })
} catch (err) {
app.log.error(err)
process.exit(1)
}