@mixd-id/web-scaffold 0.1.230406303 → 0.1.230406305

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/utils/wss.js +5 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.230406303",
4
+ "version": "0.1.230406305",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
package/src/utils/wss.js CHANGED
@@ -97,11 +97,14 @@ class WSS extends EventEmitter2{
97
97
  this._opt = opt
98
98
  this._instance = new WebSocket.Server(opt);
99
99
 
100
+ console.log('WSS', process.env.REDIS_HOST, process.env.REDIS_PORT)
100
101
  this._client = redis.createClient({
101
102
  host: process.env.REDIS_HOST ?? '127.0.0.1',
102
103
  port: process.env.REDIS_PORT ?? 6379
103
104
  })
104
- this._client.connect().then()
105
+ this._client.connect()
106
+ .then()
107
+ .catch(err => console.log('#err1', err))
105
108
 
106
109
  this._instance.on('connection', async (socket, req) => {
107
110
 
@@ -228,6 +231,7 @@ class WSS extends EventEmitter2{
228
231
  await subscriber.connect()
229
232
  }
230
233
  catch(e){
234
+ console.log('#err2', err)
231
235
  return socket.close(1002, e.message);
232
236
  }
233
237