File tree Expand file tree Collapse file tree 6 files changed +35
-3
lines changed
web-framework/nodejs/midway-koa/src Expand file tree Collapse file tree 6 files changed +35
-3
lines changed Original file line number Diff line number Diff line change 1
- web-framework/python/flask/
1
+ web-framework/nodejs/midway-koa
Original file line number Diff line number Diff line change
1
+ DB_USERNAME = xxx
2
+ DB_PASSWORD = xxx
Original file line number Diff line number Diff line change 1
1
node_modules
2
2
code /build
3
3
code /logs
4
- code /dist
4
+ code /dist
5
+ .env
Original file line number Diff line number Diff line change 30
30
},
31
31
"scripts" : {
32
32
"start" : " NODE_ENV=production node ./bootstrap.js" ,
33
- "dev" : " cross-env NODE_ENV=local midway-bin dev --ts " ,
33
+ "dev" : " node start.js " ,
34
34
"test" : " midway-bin test --ts" ,
35
35
"cov" : " midway-bin cov --ts" ,
36
36
"lint" : " mwts check" ,
Original file line number Diff line number Diff line change
1
+ "use strict"
2
+ const { CLI , checkUpdate } = require ( '@midwayjs/cli/dist' ) ;
3
+
4
+ const dotenv = require ( 'dotenv' ) ;
5
+ dotenv . config ( ) ;
6
+
7
+ const cli = new CLI ( {
8
+ _ : [ 'dev' ] ,
9
+ ts : true ,
10
+ npm : 'pnpm --registry=https://registry.npmmirror.com/'
11
+ } ) ;
12
+ cli
13
+ . start ( )
14
+ . then ( ( ) => {
15
+ process . exit ( ) ;
16
+ } )
17
+ . catch ( e => {
18
+ console . log ( '\n\n\n' ) ;
19
+ console . log (
20
+ 'Error! You can try adding the -V parameter for more information output.'
21
+ ) ;
22
+ console . log ( '\n\n\n' ) ;
23
+ console . error ( e ) ;
24
+ process . exitCode = 1 ;
25
+ process . exit ( 1 ) ;
26
+ } ) ;
27
+
Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ services:
63
63
/opt/nodejs16/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin
64
64
NODE_PATH : /opt/nodejs/node_modules
65
65
NODE_ENV : production
66
+ DB_USERNAME : ${env.DB_USERNAME}
67
+ DB_PASSWORD : ${env.DB_PASSWORD}
66
68
customRuntimeConfig :
67
69
command :
68
70
- node
You can’t perform that action at this time.
0 commit comments