repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps): bump poolifier
[poolifier.git]
/
examples
/
typescript
/
http-server-pool
/
express-cluster
/
src
/
worker.ts
diff --git
a/examples/typescript/http-server-pool/express-cluster/src/worker.ts
b/examples/typescript/http-server-pool/express-cluster/src/worker.ts
index 940503dfad3f241cceaefa3779060bd5f4afa1d8..d575647375edca90297ee647d0c4c26395e288f1 100644
(file)
--- a/
examples/typescript/http-server-pool/express-cluster/src/worker.ts
+++ b/
examples/typescript/http-server-pool/express-cluster/src/worker.ts
@@
-17,7
+17,7
@@
class ExpressWorker extends ClusterWorker<WorkerData, WorkerResponse> {
private static readonly startExpress = (
workerData?: WorkerData
): WorkerResponse => {
private static readonly startExpress = (
workerData?: WorkerData
): WorkerResponse => {
- const { port } = workerData
as WorkerData
+ const { port } = workerData
!
const application: Express = express()
const application: Express = express()
@@
-35,13
+35,12
@@
class ExpressWorker extends ClusterWorker<WorkerData, WorkerResponse> {
ExpressWorker.server = application.listen(port, () => {
console.info(
ExpressWorker.server = application.listen(port, () => {
console.info(
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
`⚡️[express server]: Express server is started in cluster worker at http://localhost:${port}/`
)
})
return {
status: true,
`⚡️[express server]: Express server is started in cluster worker at http://localhost:${port}/`
)
})
return {
status: true,
- port: (ExpressWorker.server.address() as AddressInfo)
?.port ??
port
+ port: (ExpressWorker.server.address() as AddressInfo)
.
port
}
}
}
}