File tree 6 files changed +62
-10
lines changed
6 files changed +62
-10
lines changed Original file line number Diff line number Diff line change 15
15
uses : actions/setup-node@v3
16
16
with :
17
17
node-version : 18
18
- - run : npm ci
19
- - run : npm test
18
+ - name : Install dependencies
19
+ run : find . -name 'package-lock.json' -execdir npm ci \;
20
+ - name : Run server
21
+ run : npm start &
22
+ - name : Wait for server to start
23
+ run : npx wait-on tcp:8585
24
+ - name : Run tests
25
+ run : npm run test
20
26
build-latest :
21
27
name : Build branch
22
28
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 14
14
uses : actions/setup-node@v3
15
15
with :
16
16
node-version : 18
17
- - run : npm ci
18
- - run : npm test
17
+ - name : Install dependencies
18
+ run : find . -name 'package-lock.json' -execdir npm ci \;
19
+ - name : Run server
20
+ run : npm start &
21
+ - name : Wait for server to start
22
+ run : npx wait-on tcp:8585
23
+ - name : Run tests
24
+ run : npm run test
19
25
build-latest :
20
26
name : Build latest
21
27
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 15
15
uses : actions/setup-node@v3
16
16
with :
17
17
node-version : 18
18
- - run : npm ci
19
- - run : npm test
18
+ - name : Install dependencies
19
+ run : find . -name 'package-lock.json' -execdir npm ci \;
20
+ - name : Run server
21
+ run : npm start &
22
+ - name : Wait for server to start
23
+ run : npx wait-on tcp:8585
24
+ - name : Run tests
25
+ run : npm run test
20
26
build :
21
27
name : Build with google cloud
22
28
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 7
7
"scripts" : {
8
8
"start" : " node app.js" ,
9
9
"dev" : " nodemon --inspect=0.0.0.0:9229 app.js" ,
10
- "test" : " vitest run "
10
+ "test" : " vitest"
11
11
},
12
12
"repository" : {
13
13
"type" : " git" ,
37
37
"pino-http" : " ^9.0.0" ,
38
38
"pino-pretty" : " ^10.3.1" ,
39
39
"swagger-ui-express" : " ^5.0.0" ,
40
- "vitest" : " ^0.34.6"
40
+ "vitest" : " ^0.34.6" ,
41
+ "wait-on" : " ^7.2.0"
41
42
},
42
43
"devDependencies" : {
43
44
"@types/express" : " ^4.17.18" ,
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ dotenv.config();
15
15
const rootDir = resolve ( ) ;
16
16
let allResources = null ; // This will store the entire resources tree.
17
17
18
- const port = process . env . PORT || 8585 ;
18
+ const port =
19
+ process . env . PORT_OVERRIDE || process . env . ONIFY_API_INTERNAL_PORT || 8585 ;
19
20
const resourcesSource = process . env . ONIFY_API_RESOURCES_SOURCE || '/' ;
20
21
const resourceURL = `${ process . env . ONIFY_API_URL } /admin/resources/file?stream=false&path=${ resourcesSource } ` ;
21
22
const listResourcesURL = `${ process . env . ONIFY_API_URL } /admin/resources?tree=true` ;
You can’t perform that action at this time.
0 commit comments