@jcbuisson/express-x 1.7.7 → 1.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/server.mjs +6 -6
package/package.json
CHANGED
package/src/server.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import
|
|
3
|
-
import { Server } from
|
|
2
|
+
import { createServer } from 'http'
|
|
3
|
+
import { Server } from 'socket.io'
|
|
4
4
|
import express from 'express'
|
|
5
5
|
|
|
6
6
|
/*
|
|
@@ -313,14 +313,14 @@ export function expressX(prisma, config) {
|
|
|
313
313
|
/*
|
|
314
314
|
* Create HTTP server
|
|
315
315
|
*/
|
|
316
|
-
const
|
|
316
|
+
const httpServer = createServer()
|
|
317
317
|
|
|
318
318
|
if (config.WS_TRANSPORT) {
|
|
319
319
|
/*
|
|
320
320
|
* Add websocket transport
|
|
321
321
|
*/
|
|
322
|
-
const io = new Server(
|
|
323
|
-
path: config.WS_PATH || '/
|
|
322
|
+
const io = new Server(httpServer, {
|
|
323
|
+
path: config.WS_PATH || '/socket.io/',
|
|
324
324
|
})
|
|
325
325
|
|
|
326
326
|
|
|
@@ -469,7 +469,7 @@ export function expressX(prisma, config) {
|
|
|
469
469
|
configure,
|
|
470
470
|
hooks,
|
|
471
471
|
addHttpRest,
|
|
472
|
-
|
|
472
|
+
httpServer,
|
|
473
473
|
joinChannel,
|
|
474
474
|
leaveChannel,
|
|
475
475
|
})
|