chanjs 1.0.12 → 1.0.13
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/core/chan.js +0 -7
- package/package.json +4 -4
package/core/chan.js
CHANGED
@@ -100,7 +100,6 @@ class Chan {
|
|
100
100
|
Chan.knex = knex;
|
101
101
|
}
|
102
102
|
|
103
|
-
|
104
103
|
//开始启动
|
105
104
|
beforeStart(cb) {
|
106
105
|
// 初始化一些配置
|
@@ -144,8 +143,6 @@ class Chan {
|
|
144
143
|
};
|
145
144
|
this.loadModule(modules,item);
|
146
145
|
}
|
147
|
-
|
148
|
-
|
149
146
|
//执行路由
|
150
147
|
// this.app.use(this.router);
|
151
148
|
}
|
@@ -170,7 +167,6 @@ class Chan {
|
|
170
167
|
*/
|
171
168
|
loadServices(modules,moduleName) {
|
172
169
|
const servicesDir = path.join(config.APP_PATH, modules, moduleName,"service");
|
173
|
-
|
174
170
|
if (fs.existsSync(servicesDir)) {
|
175
171
|
let services = fs
|
176
172
|
.readdirSync(servicesDir)
|
@@ -227,15 +223,12 @@ class Chan {
|
|
227
223
|
const baseRouterPath = path.join(config.APP_PATH, "router.js");
|
228
224
|
if (fs.existsSync(baseRouterPath)) {
|
229
225
|
const _router = require(baseRouterPath);
|
230
|
-
console.log('_router-->',_router);
|
231
226
|
_router(this.app, this.router);
|
232
227
|
}
|
233
228
|
} catch (error) {
|
234
229
|
console.log(error);
|
235
230
|
}
|
236
|
-
|
237
231
|
}
|
238
|
-
|
239
232
|
|
240
233
|
run() {
|
241
234
|
const port = this.app.config.port || '81';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "chanjs",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.13",
|
4
4
|
"description": "Chanjs develops a lightweight MVC framework based on express pure JavaScript",
|
5
5
|
"main": "core/chan.js",
|
6
6
|
"module":"core/chan.js",
|
@@ -16,10 +16,10 @@
|
|
16
16
|
"art-template": "^4.13.2",
|
17
17
|
"body-parser": "^1.20.2",
|
18
18
|
"cookie-parser": "^1.4.6",
|
19
|
-
"express": "^4.
|
19
|
+
"express": "^4.19.2",
|
20
20
|
"express-art-template": "^1.0.1",
|
21
|
-
"knex": "^3.0
|
21
|
+
"knex": "^3.1.0",
|
22
22
|
"morgan": "^1.10.0",
|
23
|
-
"mysql2": "^3.
|
23
|
+
"mysql2": "^3.11.0"
|
24
24
|
}
|
25
25
|
}
|