perf: use node: prefix to bypass caching call for builtins
[poolifier.git] / examples / typescript / http-server-pool / express-hybrid / src / express-worker.ts
index 901c207244be4a9783521d808da25b4f59f594bd..c7ca23adee4a4c2c48ec5a06f9792f93d45438fe 100644 (file)
@@ -1,5 +1,5 @@
-import type { Server } from 'http'
-import type { AddressInfo } from 'net'
+import type { Server } from 'node:http'
+import type { AddressInfo } from 'node:net'
 import {
   ClusterWorker,
   DynamicThreadPool,
@@ -15,7 +15,7 @@ import {
 } from './types.js'
 
 const emptyFunction = (): void => {
-  /** Intentional */
+  /* Intentional */
 }
 
 class ExpressWorker extends ClusterWorker<
@@ -52,7 +52,7 @@ ClusterWorkerResponse
     application.all('/api/echo', (req: Request, res: Response) => {
       ExpressWorker.requestHandlerPool
         .execute({ data: req.body }, 'echo')
-        .then((response) => {
+        .then(response => {
           return res.send(response.data).end()
         })
         .catch(emptyFunction)
@@ -62,7 +62,7 @@ ClusterWorkerResponse
       const { number } = req.params
       ExpressWorker.requestHandlerPool
         .execute({ data: { number: parseInt(number) } }, 'factorial')
-        .then((response) => {
+        .then(response => {
           return res.send(response.data).end()
         })
         .catch(emptyFunction)