X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fwebsocket-server-pool%2Fws-cluster%2Fsrc%2Fmain.ts;h=6187d71fc3ae157177c2172e9bbdfdee3d5d56ad;hb=cf02ff9e146e22a2f99a6af35de7ce49efd4c6b5;hp=ebf35134f97b53db152f56ffa3fd15fa81ea9f84;hpb=8ebe6c308dc1fc3202980126da043b2855d24780;p=poolifier.git diff --git a/examples/typescript/websocket-server-pool/ws-cluster/src/main.ts b/examples/typescript/websocket-server-pool/ws-cluster/src/main.ts index ebf35134..6187d71f 100644 --- a/examples/typescript/websocket-server-pool/ws-cluster/src/main.ts +++ b/examples/typescript/websocket-server-pool/ws-cluster/src/main.ts @@ -1,7 +1,7 @@ import { dirname, extname, join } from 'node:path' import { fileURLToPath } from 'node:url' import { FixedClusterPool, availableParallelism } from 'poolifier' -import { type WorkerData, type WorkerResponse } from './types.js' +import type { WorkerData, WorkerResponse } from './types.js' const workerFile = join( dirname(fileURLToPath(import.meta.url)), @@ -15,7 +15,7 @@ const pool = new FixedClusterPool( onlineHandler: () => { pool .execute({ port: 8080 }) - .then((response) => { + .then(response => { if (response.status) { console.info( // eslint-disable-next-line @typescript-eslint/restrict-template-expressions @@ -24,7 +24,7 @@ const pool = new FixedClusterPool( } return null }) - .catch((error) => { + .catch(error => { console.error( 'WebSocket server failed to start in cluster worker:', error