-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,
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)
const { number } = req.params
ExpressWorker.requestHandlerPool
.execute({ data: { number: parseInt(number) } }, 'factorial')
- .then((response) => {
+ .then(response => {
return res.send(response.data).end()
})
.catch(emptyFunction)