X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fhttp-server-pool%2Ffastify-cluster%2Fsrc%2Fmain.ts;h=1dc88be27f0ca235775b0ce61014160c464bbe40;hb=8ccfa7d88f7fcfa93b1e826f31cc92d7bf288e80;hp=882c1acdad98376691c698f88943f8cfe6fef1fb;hpb=8a199a0a5716a52b4f54f212c2d139b7fddee9bc;p=poolifier.git 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 882c1acd..1dc88be2 100644 --- a/examples/typescript/http-server-pool/fastify-cluster/src/main.ts +++ b/examples/typescript/http-server-pool/fastify-cluster/src/main.ts @@ -15,23 +15,21 @@ 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 - `Fastify is listening on worker on port ${response.port}` + `Fastify is listening in cluster worker on port ${response.port}` ) - } else { - console.error('Fastify failed to start on worker:', response.error) } return null }) - .catch(error => { - console.error(error) + .catch((error) => { + console.error('Fastify failed to start in cluster worker:', error) }) }, errorHandler: (e: Error) => { - console.error(e) + console.error('Cluster worker error:', e) } } )