perf: switch benchmarks to factorial(50000)
[poolifier.git] / examples / typescript / websocket-server-pool / ws-worker_threads / src / main.ts
index f3aea4e5b60a2cdc15fa2f3a124ed93673b39b53..7a162499d8f91417246fe1b94289b62083ec584d 100644 (file)
@@ -41,10 +41,13 @@ wss.on('connection', ws => {
           .execute({ data }, 'factorial')
           .then(response => {
             ws.send(
-              JSON.stringify({
-                type: MessageType.factorial,
-                data: response.data
-              })
+              JSON.stringify(
+                {
+                  type: MessageType.factorial,
+                  data: response.data
+                },
+                (_, v) => (typeof v === 'bigint' ? v.toString() : v)
+              )
             )
             return undefined
           })