From: Jérôme Benoit Date: Sun, 13 Aug 2023 16:39:37 +0000 (+0200) Subject: refactor: cleanup error messages in TS examples X-Git-Tag: v2.6.25~4 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=80ccdab6c5ce5e7e6305c15dd29257d0acc9e302;p=poolifier.git refactor: cleanup error messages in TS examples Signed-off-by: Jérôme Benoit --- diff --git a/examples/typescript/http-server-pool/fastify-cluster/src/main.ts b/examples/typescript/http-server-pool/fastify-cluster/src/main.ts index b462d8c5..88167a3c 100644 --- a/examples/typescript/http-server-pool/fastify-cluster/src/main.ts +++ b/examples/typescript/http-server-pool/fastify-cluster/src/main.ts @@ -19,13 +19,13 @@ const pool = new FixedClusterPool( if (response.status) { console.info( // eslint-disable-next-line @typescript-eslint/restrict-template-expressions - `Fastify is listening on cluster worker on port ${response.port}` + `Fastify is listening in cluster worker on port ${response.port}` ) } return null }) .catch(error => { - console.error('Fastify failed to start on cluster worker:', error) + console.error('Fastify failed to start in cluster worker:', error) }) }, errorHandler: (e: Error) => { diff --git a/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts b/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts index d995fd29..9b269760 100644 --- a/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts +++ b/examples/typescript/http-server-pool/fastify-hybrid/src/main.ts @@ -35,13 +35,13 @@ const pool = new FixedClusterPool( if (response.status) { console.info( // eslint-disable-next-line @typescript-eslint/restrict-template-expressions - `Fastify is listening on cluster worker on port ${response.port}` + `Fastify is listening in cluster worker on port ${response.port}` ) } return null }) .catch(error => { - console.error('Fastify failed to start on cluster worker:', error) + console.error('Fastify failed to start in cluster worker:', error) }) }, errorHandler: (e: Error) => { 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 97124326..ad58bd20 100644 --- a/examples/typescript/websocket-server-pool/ws-cluster/src/main.ts +++ b/examples/typescript/websocket-server-pool/ws-cluster/src/main.ts @@ -19,14 +19,14 @@ const pool = new FixedClusterPool( if (response.status) { console.info( // eslint-disable-next-line @typescript-eslint/restrict-template-expressions - `WebSocket server is listening on cluster worker on port ${response.port}` + `WebSocket server is listening in cluster worker on port ${response.port}` ) } return null }) .catch(error => { console.error( - 'WebSocket server failed to start on cluster worker:', + 'WebSocket server failed to start in cluster worker:', error ) }) diff --git a/examples/typescript/websocket-server-pool/ws-cluster/src/worker.ts b/examples/typescript/websocket-server-pool/ws-cluster/src/worker.ts index 48c6cc43..f261a6d7 100644 --- a/examples/typescript/websocket-server-pool/ws-cluster/src/worker.ts +++ b/examples/typescript/websocket-server-pool/ws-cluster/src/worker.ts @@ -19,7 +19,7 @@ const startWebSocketServer = (workerData?: WorkerData): WorkerResponse => { const { port } = workerData as WorkerData const wss = new WebSocketServer({ port }, () => { console.info( - `⚡️[ws server]: WebSocket server is started on cluster worker at ws://localhost:${port}/` + `⚡️[ws server]: WebSocket server is started in cluster worker at ws://localhost:${port}/` ) }) diff --git a/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts b/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts index ae303015..6f73fa07 100644 --- a/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts +++ b/examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts @@ -19,14 +19,14 @@ const pool = new FixedClusterPool( if (response.status) { console.info( // eslint-disable-next-line @typescript-eslint/restrict-template-expressions - `WebSocket server is listening on cluster worker on port ${response.port}` + `WebSocket server is listening in cluster worker on port ${response.port}` ) } return null }) .catch(error => { console.error( - 'WebSocket server failed to start on cluster worker:', + 'WebSocket server failed to start in cluster worker:', error ) }) diff --git a/examples/typescript/websocket-server-pool/ws-hybrid/src/websocket-server-worker.ts b/examples/typescript/websocket-server-pool/ws-hybrid/src/websocket-server-worker.ts index 71cce531..2418be61 100644 --- a/examples/typescript/websocket-server-pool/ws-hybrid/src/websocket-server-worker.ts +++ b/examples/typescript/websocket-server-pool/ws-hybrid/src/websocket-server-worker.ts @@ -30,7 +30,7 @@ ClusterWorkerResponse const { port } = workerData as ClusterWorkerData const wss = new WebSocketServer({ port }, () => { console.info( - `⚡️[ws server]: WebSocket server is started on cluster worker at ws://localhost:${port}/` + `⚡️[ws server]: WebSocket server is started in cluster worker at ws://localhost:${port}/` ) })