File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,13 @@ dotenv.config({ path: '../../config/.server.env' });
99
1010const app = express ( ) ;
1111const PORT = process . env . PORT || 8000 ;
12+ const HOST_ADDRESS = process . env . HOST_ADDRESS || 'localhost'
1213
1314const swaggerSpec = YAML . load ( path . join ( __dirname , './swagger.yaml' ) ) ;
1415const portInjectedSwaggerSpec = JSON . stringify ( swaggerSpec ) . replace (
1516 '{PORT}' ,
1617 PORT . toString ( )
17- ) ;
18+ ) . replace ( '{HOST_ADDRESS}' , HOST_ADDRESS ) ;
1819
1920import visitor from './src/apis/visitor' ;
2021
Original file line number Diff line number Diff line change 44 title : ' dev-portfolio API'
55 description : ' dev-portfolio API'
66servers :
7- - url : http://localhost :{PORT}/
7+ - url : http://{HOST_ADDRESS} :{PORT}/
88paths :
99 /apis/visitor/count :
1010 patch :
You can’t perform that action at this time.
0 commit comments