repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps): apply updates
[poolifier.git]
/
examples
/
typescript
/
http-server-pool
/
fastify-cluster
/
src
/
worker.ts
diff --git
a/examples/typescript/http-server-pool/fastify-cluster/src/worker.ts
b/examples/typescript/http-server-pool/fastify-cluster/src/worker.ts
index 2f6c8f6dec1fcf405c8ce5bdb78a51c84c7c1915..5fca89058695c7a45614b15d2eeb10bd690d9491 100644
(file)
--- a/
examples/typescript/http-server-pool/fastify-cluster/src/worker.ts
+++ b/
examples/typescript/http-server-pool/fastify-cluster/src/worker.ts
@@
-16,7
+16,7
@@
class FastifyWorker extends ClusterWorker<WorkerData, WorkerResponse> {
private static readonly startFastify = async (
workerData?: WorkerData
): Promise<WorkerResponse> => {
private static readonly startFastify = async (
workerData?: WorkerData
): Promise<WorkerResponse> => {
- const { port } = workerData
as WorkerData
+ const { port } = workerData
!
FastifyWorker.fastify = Fastify({
logger: true
FastifyWorker.fastify = Fastify({
logger: true
@@
-36,7
+36,7
@@
class FastifyWorker extends ClusterWorker<WorkerData, WorkerResponse> {
await FastifyWorker.fastify.listen({ port })
return {
status: true,
await FastifyWorker.fastify.listen({ port })
return {
status: true,
- port: (FastifyWorker.fastify.server.address() as AddressInfo)
?
.port
+ port: (FastifyWorker.fastify.server.address() as AddressInfo).port
}
}
}
}