repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): bump typescript
[poolifier.git]
/
examples
/
typescript
/
websocket-server-pool
/
ws-worker_threads
/
src
/
main.ts
diff --git
a/examples/typescript/websocket-server-pool/ws-worker_threads/src/main.ts
b/examples/typescript/websocket-server-pool/ws-worker_threads/src/main.ts
index 6283759d403047be2837b8322147f0741973adcd..0c1acba1b43bc1683261788b001c78c931c08c0c 100644
(file)
--- a/
examples/typescript/websocket-server-pool/ws-worker_threads/src/main.ts
+++ b/
examples/typescript/websocket-server-pool/ws-worker_threads/src/main.ts
@@
-10,10
+10,10
@@
const wss = new WebSocketServer({ port }, () => {
})
const emptyFunction = (): void => {
})
const emptyFunction = (): void => {
- /*
*
Intentional */
+ /* Intentional */
}
}
-wss.on('connection',
ws
=> {
+wss.on('connection',
(ws)
=> {
ws.on('error', console.error)
ws.on('message', (message: RawData) => {
const { type, data } = JSON.parse(
ws.on('error', console.error)
ws.on('message', (message: RawData) => {
const { type, data } = JSON.parse(
@@
-24,7
+24,7
@@
wss.on('connection', ws => {
case MessageType.echo:
requestHandlerPool
.execute({ data }, 'echo')
case MessageType.echo:
requestHandlerPool
.execute({ data }, 'echo')
- .then(
response
=> {
+ .then(
(response)
=> {
ws.send(
JSON.stringify({
type: MessageType.echo,
ws.send(
JSON.stringify({
type: MessageType.echo,
@@
-38,7
+38,7
@@
wss.on('connection', ws => {
case MessageType.factorial:
requestHandlerPool
.execute({ data }, 'factorial')
case MessageType.factorial:
requestHandlerPool
.execute({ data }, 'factorial')
- .then(
response
=> {
+ .then(
(response)
=> {
ws.send(
JSON.stringify({
type: MessageType.factorial,
ws.send(
JSON.stringify({
type: MessageType.factorial,