@asapjs/core 0.1.1 → 0.1.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../src/application.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../src/application.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,OAAO,CAAC,MAAM,CAAM;IAEpB,OAAO,CAAC,GAAG,CAAsB;gBAErB,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG;IAK/C,OAAO,CAAC,WAAW,CASjB;IAEK,GAAG,sBAWR;CACH"}
|
package/dist/application.js
CHANGED
|
@@ -14,6 +14,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const sequelize_1 = require("@asapjs/sequelize");
|
|
16
16
|
const router_1 = require("@asapjs/router");
|
|
17
|
+
const socket_1 = require("@asapjs/socket");
|
|
18
|
+
const http_1 = __importDefault(require("http"));
|
|
17
19
|
const logger_1 = __importDefault(require("./util/logger"));
|
|
18
20
|
const config_1 = require("./config");
|
|
19
21
|
class Application {
|
|
@@ -29,7 +31,11 @@ class Application {
|
|
|
29
31
|
});
|
|
30
32
|
this.run = () => __awaiter(this, void 0, void 0, function* () {
|
|
31
33
|
yield this.initMoudles(this.config.dirname);
|
|
32
|
-
this.app
|
|
34
|
+
const server = http_1.default.createServer(this.app);
|
|
35
|
+
if (this.config.extensions.includes('@asapjs/socket')) {
|
|
36
|
+
yield (0, socket_1.initSocketModule)(server, this.config.dirname);
|
|
37
|
+
}
|
|
38
|
+
server
|
|
33
39
|
.listen(this.config.port, () => logger_1.default.info(`@express :: Server is listening at ${this.config.port}`))
|
|
34
40
|
.on('error', (error) => logger_1.default.error(error));
|
|
35
41
|
});
|
package/dist/application.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.js","sourceRoot":"","sources":["../src/application.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,iDAAwD;AACxD,2CAA8C;
|
|
1
|
+
{"version":3,"file":"application.js","sourceRoot":"","sources":["../src/application.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,iDAAwD;AACxD,2CAA8C;AAC9C,2CAAkD;AAGlD,gDAAwB;AAExB,2DAAmC;AACnC,qCAAqC;AAErC,MAAqB,WAAW;IAK9B,YAAY,OAAe,EAAE,aAAkB;QAKvC,gBAAW,GAAG,CAAO,OAAe,EAAE,EAAE;YAC9C,6BAA6B;YAC7B,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,qBAAY,CAAC,OAAO,CAAC,CAAC;YAC1C,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YAEf,gCAAgC;YAChC,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE;gBACxD,MAAM,IAAA,+BAAmB,EAAC,OAAO,CAAC,CAAC;aACpC;QACH,CAAC,CAAA,CAAC;QAEK,QAAG,GAAG,GAAS,EAAE;YACtB,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC5C,MAAM,MAAM,GAAG,cAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAE3C,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE;gBACrD,MAAM,IAAA,yBAAgB,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;aACrD;YAED,MAAM;iBACH,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,gBAAM,CAAC,IAAI,CAAC,sCAAsC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;iBACrG,EAAE,CAAC,OAAO,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,gBAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QACzD,CAAC,CAAA,CAAC;QA1BA,IAAA,kBAAS,EAAC,aAAa,CAAC,CAAC;QACzB,IAAI,CAAC,MAAM,mBAAK,OAAO,IAAK,aAAa,CAAE,CAAC;IAC9C,CAAC;CAyBF;AAjCD,8BAiCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asapjs/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@asapjs/router": "0.0.2",
|
|
23
23
|
"@asapjs/sequelize": "^0.0.2",
|
|
24
|
+
"@asapjs/socket": "^0.0.1",
|
|
24
25
|
"@types/body-parser": "^1.19.2",
|
|
25
26
|
"@types/cors": "^2.8.12",
|
|
26
27
|
"@types/express": "^4.17.13",
|