File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const defaultConfiguration = {
36
36
development : ! ( process . env . NODE_ENV || '' ) . match ( / ^ p r o d / i) ,
37
37
logging : true ,
38
38
index : 'index.html' ,
39
- hostname : 'localhost ' ,
39
+ bind : '0.0.0.0 ' ,
40
40
port : 8000 ,
41
41
public : null ,
42
42
morgan : 'tiny' ,
Original file line number Diff line number Diff line change @@ -201,13 +201,14 @@ class Core extends CoreBase {
201
201
*/
202
202
listen ( ) {
203
203
const httpPort = this . config ( 'port' ) ;
204
+ const httpHost = this . config ( 'bind' ) ;
204
205
const wsPort = this . config ( 'ws.port' ) || httpPort ;
205
206
const pub = this . config ( 'public' ) ;
206
207
const session = path . basename ( path . dirname ( this . config ( 'session.store.module' ) ) ) ;
207
208
const dist = pub . replace ( process . cwd ( ) , '' ) ;
208
209
const secure = this . config ( 'https.enabled' , false ) ;
209
210
const proto = prefix => `${ prefix } ${ secure ? 's' : '' } ://` ;
210
- const host = port => `${ this . config ( 'hostname' ) } :${ port } ` ;
211
+ const host = port => `${ httpHost } :${ port } ` ;
211
212
212
213
logger . info ( 'Opening server connection' ) ;
213
214
@@ -216,7 +217,7 @@ class Core extends CoreBase {
216
217
logger . warn ( 'Missing files in "dist/" directory. Did you forget to run "npm run build" ?' ) ;
217
218
}
218
219
219
- this . httpServer . listen ( httpPort , ( ) => {
220
+ this . httpServer . listen ( httpPort , httpHost , ( ) => {
220
221
logger . success ( `Using '${ session } ' sessions` ) ;
221
222
logger . success ( `Serving '${ dist } '` ) ;
222
223
logger . success ( `WebSocket listening on ${ proto ( 'ws' ) } ${ host ( wsPort ) } ` ) ;
You can’t perform that action at this time.
0 commit comments