ismx-nexo-node-app 0.4.170 → 0.4.171
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.
|
@@ -46,8 +46,10 @@ class BusinessServer extends Business_1.default {
|
|
|
46
46
|
}
|
|
47
47
|
init() {
|
|
48
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
const
|
|
50
|
-
const
|
|
49
|
+
const express = yield Promise.resolve().then(() => __importStar(require("express"))).then((e) => e.default).catch(() => null);
|
|
50
|
+
const cors = yield Promise.resolve().then(() => __importStar(require("cors"))).then((e) => e.default).catch(() => null);
|
|
51
|
+
if (!express || !cors)
|
|
52
|
+
return;
|
|
51
53
|
this.express = express;
|
|
52
54
|
this.app = express();
|
|
53
55
|
this.app.use(express.urlencoded({ extended: false }));
|
package/package.json
CHANGED
|
@@ -17,8 +17,9 @@ export default class BusinessServer extends Business
|
|
|
17
17
|
|
|
18
18
|
async init()
|
|
19
19
|
{
|
|
20
|
-
const
|
|
21
|
-
const
|
|
20
|
+
const express = await import("express").then((e) => e.default).catch(() => null);
|
|
21
|
+
const cors = await import("cors").then((e) => e.default).catch(() => null);
|
|
22
|
+
if (!express || !cors) return;
|
|
22
23
|
|
|
23
24
|
this.express = express;
|
|
24
25
|
this.app = express();
|