Skip to content

Commit 1e98f1a

Browse files
committed
fix: ts happy
Signed-off-by: Innei <i@innei.in>
1 parent db9b935 commit 1e98f1a

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

src/server.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Require library to exit fastify process, gracefully (if possible)
2-
import closeWithGrace from 'close-with-grace'
32
import * as dotenv from 'dotenv'
43
// Require the framework
54
import Fastify from 'fastify'
@@ -19,20 +18,6 @@ const app = Fastify({
1918
// Register your application as a normal plugin.
2019
void app.register(import('./app'))
2120

22-
// Delay is the number of milliseconds for the graceful close to finish
23-
const closeListeners = closeWithGrace({ delay: 500 }, async (opts: any) => {
24-
if (opts.err) {
25-
app.log.error(opts.err)
26-
}
27-
28-
await app.close()
29-
})
30-
31-
app.addHook('onClose', async (_instance, done) => {
32-
closeListeners.uninstall()
33-
done()
34-
})
35-
3621
// Start listening.
3722
void app.listen({
3823
port: Number(process.env.PORT ?? 3000),

0 commit comments

Comments
 (0)