@bee.js/node 0.0.65 → 0.0.67

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.
@@ -3,14 +3,18 @@ const beeDEV = require("../DEV/beeDEV");
3
3
  const https = require("https");
4
4
  const fs = require("fs");
5
5
 
6
- module.exports = function (app) {
6
+ module.exports = function (app, { ws } = {}) {
7
7
  const ports = (global.configs.port || global.configs.ports || 1987.443)
8
8
  .toString()
9
9
  .split(".");
10
10
 
11
+ const ws = () => {
12
+ ws?.({ app });
13
+ };
14
+
11
15
  app.post("/beedev/:action", beeDEV); //TODO check security and create a method for define enable/disable
12
16
 
13
- app.listen(ports[0]);
17
+ app.listen(ports[0], ws);
14
18
 
15
19
  log(`${configs.name || "Bee.js"} started.`);
16
20
  log(`${configs.name || "System"} listening at http://localhost:${ports[0]}`);
@@ -29,7 +33,7 @@ module.exports = function (app) {
29
33
  }
30
34
  : {};
31
35
 
32
- const server = https.createServer(certificate, app).listen(ports[1]);
36
+ const server = https.createServer(certificate, app).listen(ports[1], ws);
33
37
 
34
38
  log(`${configs.name || "Bee.js"} listening at https://localhost:${ports[1]}`);
35
39
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bee.js/node",
3
- "version": "0.0.65",
3
+ "version": "0.0.67",
4
4
  "description": "A JavaScript framework for making Node.js API´s",
5
5
  "main": "index.js",
6
6
  "scripts": {