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 = {
3636 development : ! ( process . env . NODE_ENV || '' ) . match ( / ^ p r o d / i) ,
3737 logging : true ,
3838 index : 'index.html' ,
39- hostname : 'localhost ' ,
39+ bind : '0.0.0.0 ' ,
4040 port : 8000 ,
4141 public : null ,
4242 morgan : 'tiny' ,
Original file line number Diff line number Diff line change @@ -201,13 +201,14 @@ class Core extends CoreBase {
201201 */
202202 listen ( ) {
203203 const httpPort = this . config ( 'port' ) ;
204+ const httpHost = this . config ( 'bind' ) ;
204205 const wsPort = this . config ( 'ws.port' ) || httpPort ;
205206 const pub = this . config ( 'public' ) ;
206207 const session = path . basename ( path . dirname ( this . config ( 'session.store.module' ) ) ) ;
207208 const dist = pub . replace ( process . cwd ( ) , '' ) ;
208209 const secure = this . config ( 'https.enabled' , false ) ;
209210 const proto = prefix => `${ prefix } ${ secure ? 's' : '' } ://` ;
210- const host = port => `${ this . config ( 'hostname' ) } :${ port } ` ;
211+ const host = port => `${ httpHost } :${ port } ` ;
211212
212213 logger . info ( 'Opening server connection' ) ;
213214
@@ -216,7 +217,7 @@ class Core extends CoreBase {
216217 logger . warn ( 'Missing files in "dist/" directory. Did you forget to run "npm run build" ?' ) ;
217218 }
218219
219- this . httpServer . listen ( httpPort , ( ) => {
220+ this . httpServer . listen ( httpPort , httpHost , ( ) => {
220221 logger . success ( `Using '${ session } ' sessions` ) ;
221222 logger . success ( `Serving '${ dist } '` ) ;
222223 logger . success ( `WebSocket listening on ${ proto ( 'ws' ) } ${ host ( wsPort ) } ` ) ;
You can’t perform that action at this time.
0 commit comments