File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ export default {
39
39
} ,
40
40
server : {
41
41
env : 'development' ,
42
+ listenInterface : process . env . RI_LISTEN_INTERFACE === '*' ? '' : ( process . env . RI_LISTEN_INTERFACE || '127.0.0.1' ) ,
42
43
port : 5000 ,
43
44
docPrefix : 'api/docs' ,
44
45
globalPrefix : 'api' ,
Original file line number Diff line number Diff line change @@ -12,10 +12,11 @@ import { AppModule } from './app.module';
12
12
import SWAGGER_CONFIG from '../config/swagger' ;
13
13
import LOGGER_CONFIG from '../config/logger' ;
14
14
15
+ const serverConfig = get ( 'server' ) ;
16
+
15
17
export default async function bootstrap ( ) : Promise < Function > {
16
18
await migrateHomeFolder ( ) ;
17
19
18
- const serverConfig = get ( 'server' ) ;
19
20
const port = process . env . API_PORT || serverConfig . port ;
20
21
const logger = WinstonModule . createLogger ( LOGGER_CONFIG ) ;
21
22
@@ -47,7 +48,7 @@ export default async function bootstrap(): Promise<Function> {
47
48
48
49
const logFileProvider = app . get ( LogFileProvider ) ;
49
50
50
- await app . listen ( port ) ;
51
+ await app . listen ( port , serverConfig . listenInterface ) ;
51
52
logger . log ( {
52
53
message : `Server is running on http(s)://localhost:${ port } ` ,
53
54
context : 'bootstrap' ,
You can’t perform that action at this time.
0 commit comments