corebasic 1.0.75 → 1.0.77

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/libs/features.js CHANGED
@@ -47,7 +47,9 @@ export const start = async (app, url, file) => {
47
47
  } else
48
48
  await commandAction(req, res, topic)
49
49
  } catch (err) {
50
- res.status(err.status ?? 500).json(err)
50
+ try { // Sometimes error occurs when disconnecting stream from front end
51
+ res.status(err.status ?? 500).json(err)
52
+ } catch () { }
51
53
  }
52
54
  })
53
55
  }
package/libs/messaging.js CHANGED
@@ -37,9 +37,10 @@ async function connect({user,req,res, uid}) {
37
37
  }
38
38
 
39
39
  export async function start(app) {
40
- consumer = createClient({ url: 'redis://localhost:6380' });
40
+ const url = process.env.REDIS_URL || "redis://localhost:6380"
41
+ consumer = createClient({ url });
41
42
  await consumer.connect();
42
- publisher = createClient({ url: 'redis://localhost:6380' });
43
+ publisher = createClient({ url });
43
44
  await publisher.connect();
44
45
 
45
46
  consumer.on('error', err => console.log('Redis Client Error', err));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "corebasic",
3
3
  "type": "module",
4
- "version": "1.0.75",
4
+ "version": "1.0.77",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {