@bee.js/node 0.0.66 → 0.0.68
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/lib/beeHive/start.js +8 -4
- package/package.json +1 -1
package/lib/beeHive/start.js
CHANGED
|
@@ -8,11 +8,13 @@ module.exports = function (app, { ws } = {}) {
|
|
|
8
8
|
.toString()
|
|
9
9
|
.split(".");
|
|
10
10
|
|
|
11
|
+
const callback = () => {
|
|
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],
|
|
14
|
-
ws?.({ app });
|
|
15
|
-
});
|
|
17
|
+
app.listen(ports[0], callback);
|
|
16
18
|
|
|
17
19
|
log(`${configs.name || "Bee.js"} started.`);
|
|
18
20
|
log(`${configs.name || "System"} listening at http://localhost:${ports[0]}`);
|
|
@@ -31,7 +33,9 @@ module.exports = function (app, { ws } = {}) {
|
|
|
31
33
|
}
|
|
32
34
|
: {};
|
|
33
35
|
|
|
34
|
-
const server = https
|
|
36
|
+
const server = https
|
|
37
|
+
.createServer(certificate, app)
|
|
38
|
+
.listen(ports[1], callback);
|
|
35
39
|
|
|
36
40
|
log(`${configs.name || "Bee.js"} listening at https://localhost:${ports[1]}`);
|
|
37
41
|
|