From 80ccdab6c5ce5e7e6305c15dd29257d0acc9e302 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 13 Aug 2023 18:39:37 +0200 Subject: [PATCH] refactor: cleanup error messages in TS examples MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../typescript/http-server-pool/fastify-cluster/src/main.ts | 4 ++-- .../typescript/http-server-pool/fastify-hybrid/src/main.ts | 4 ++-- .../typescript/websocket-server-pool/ws-cluster/src/main.ts | 4 ++-- .../typescript/websocket-server-pool/ws-cluster/src/worker.ts | 2 +- .../typescript/websocket-server-pool/ws-hybrid/src/main.ts | 4 ++-- .../ws-hybrid/src/websocket-server-worker.ts | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) 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}/` ) }) -- 2.34.1