File tree Expand file tree Collapse file tree 5 files changed +22
-22
lines changed Expand file tree Collapse file tree 5 files changed +22
-22
lines changed Original file line number Diff line number Diff line change 1
- web-framework/nodejs/thinkjs
1
+ web-framework/nodejs/egg
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ Type: Application
2
2
Name : start-egg
3
3
Provider :
4
4
- 阿里云
5
- Version : 1.2.21
5
+ Version : 1.2.22
6
6
Description : 为企业级框架和应用而生(部署到Custom运行时)
7
7
HomePage : https://github.com/devsapp/start-web-framework
8
8
Tags :
Original file line number Diff line number Diff line change 8
8
},
9
9
"dependencies" : {
10
10
"egg" : " ^2.15.1" ,
11
- "egg-scripts" : " ^2.11.0" ,
12
11
"egg-view-nunjucks" : " ^2.2.0"
13
12
},
14
13
"devDependencies" : {
15
- "autod" : " ^3.0.1" ,
16
- "autod-egg" : " ^1.1.0" ,
17
- "egg-bin" : " ^4.11.0" ,
18
- "egg-ci" : " ^1.11.0" ,
19
- "egg-mock" : " ^3.21.0" ,
20
14
"eslint" : " ^5.13.0" ,
21
15
"eslint-config-egg" : " ^7.1.0"
22
16
},
23
17
"engines" : {
24
18
"node" : " >=10.0.0"
25
19
},
26
20
"scripts" : {
27
- "start" : " egg-scripts start --daemon --title=egg-server-eggjs" ,
28
- "stop" : " egg-scripts stop --title=egg-server-eggjs" ,
29
- "dev" : " egg-bin dev" ,
30
- "debug" : " egg-bin debug" ,
31
- "test" : " npm run lint -- --fix && npm run test-local" ,
32
- "test-local" : " egg-bin test" ,
33
- "cov" : " egg-bin cov" ,
34
- "lint" : " eslint ." ,
35
- "ci" : " npm run lint && npm run cov" ,
36
- "autod" : " autod"
37
- },
38
- "ci" : {
39
- "version" : " 10"
21
+ "start" : " node ./start.js" ,
22
+ "lint" : " eslint ."
40
23
},
41
24
"repository" : {
42
25
"type" : " git" ,
43
26
"url" : " "
44
27
},
45
- "author" : " vangie " ,
28
+ "author" : " mamba " ,
46
29
"license" : " MIT"
47
30
}
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ /**
4
+ * docker 中 node 路径:/var/lang/node12/bin/node
5
+ * NODE_LOG_DIR 是为了改写 egg-scripts 默认 node 写入路径(~/logs)-> /tmp
6
+ * EGG_APP_CONFIG 是为了修改 egg 应有的默认当前目录 -> /tmp
7
+ */
8
+
9
+ const { Application } = require ( 'egg' ) ;
10
+
11
+ const app = new Application ( {
12
+ mode : 'single' ,
13
+ } ) ;
14
+
15
+ app . listen ( 9000 , '0.0.0.0' , ( ) => {
16
+ console . log ( 'Server start on http://0.0.0.0:9000' ) ;
17
+ } ) ;
You can’t perform that action at this time.
0 commit comments