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 11node_modules
22code /build
33code /logs
4- code /dist
4+ code /dist
5+ .env
Original file line number Diff line number Diff line change 3030 },
3131 "scripts" : {
3232 "start" : " NODE_ENV=production node ./bootstrap.js" ,
33- "dev" : " cross-env NODE_ENV=local midway-bin dev --ts " ,
33+ "dev" : " node start.js " ,
3434 "test" : " midway-bin test --ts" ,
3535 "cov" : " midway-bin cov --ts" ,
3636 "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:
6363 /opt/nodejs16/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin
6464 NODE_PATH : /opt/nodejs/node_modules
6565 NODE_ENV : production
66+ DB_USERNAME : ${env.DB_USERNAME}
67+ DB_PASSWORD : ${env.DB_PASSWORD}
6668 customRuntimeConfig :
6769 command :
6870 - node
You can’t perform that action at this time.
0 commit comments