refactor: avoid direct process usage
[poolifier.git] / examples / typescript / http-server-pool / fastify-worker_threads / src / main.ts
index cc647a0fd2a707916999b6521096e298f872837d..724836de7ef6fb5287e511a59d5cbe71cb360c22 100644 (file)
@@ -1,5 +1,6 @@
 import { dirname, extname, join } from 'node:path'
 import { fileURLToPath } from 'node:url'
+import { exit } from 'node:process'
 import Fastify from 'fastify'
 import { fastifyPoolifier } from './fastify-poolifier.js'
 
@@ -43,5 +44,5 @@ try {
   await fastify.listen({ port })
 } catch (err) {
   fastify.log.error(err)
-  process.exit(1)
+  exit(1)
 }