repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge dependabot/npm_and_yarn/types/node-20.11.14 into combined-prs-branch
[poolifier.git]
/
examples
/
typescript
/
http-server-pool
/
express-hybrid
/
src
/
main.ts
diff --git
a/examples/typescript/http-server-pool/express-hybrid/src/main.ts
b/examples/typescript/http-server-pool/express-hybrid/src/main.ts
index 08563f4b2e753cefa3a331e9d0193be2a809f526..e339f83a276893e360140c77c40f510950e9406c 100644
(file)
--- a/
examples/typescript/http-server-pool/express-hybrid/src/main.ts
+++ b/
examples/typescript/http-server-pool/express-hybrid/src/main.ts
@@
-17,6
+17,7
@@
const pool = new FixedClusterPool<ClusterWorkerData, ClusterWorkerResponse>(
availableParallelism(),
expressWorkerFile,
{
availableParallelism(),
expressWorkerFile,
{
+ enableEvents: false,
onlineHandler: () => {
pool
.execute({
onlineHandler: () => {
pool
.execute({
@@
-37,11
+38,10
@@
const pool = new FixedClusterPool<ClusterWorkerData, ClusterWorkerResponse>(
.then(response => {
if (response.status) {
console.info(
.then(response => {
if (response.status) {
console.info(
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
- `Express is listening in cluster worker on port ${response?.port}`
+ `Express is listening in cluster worker on port ${response.port}`
)
}
)
}
- return
null
+ return
undefined
})
.catch(error => {
console.error('Express failed to start in cluster worker:', error)
})
.catch(error => {
console.error('Express failed to start in cluster worker:', error)