@@ -104,6 +104,7 @@ class Server {
104104 proxyManager : ?ProxyManager = null ;
105105 processManager : ?ProcessManager = null ;
106106 url : ?string ;
107+ baseUrl : ?string ;
107108 client : ?Client = null ;
108109 base : ?HTTPServer = null ;
109110 q : Array < ( ) => void > = [ ] ;
@@ -162,7 +163,9 @@ class Server {
162163 item ( base ) ;
163164 } ) ;
164165 this . q = [ ] ;
165- this . url = `http://localhost:${ base . address ( ) . port } ${ this . apiPrefix } ` ;
166+ this . baseUrl = `http://localhost:${ base . address ( ) . port } ` ;
167+ this . url = `${ this . baseUrl } ${ this . apiPrefix } ` ;
168+
166169 debug ( `Using server ${ this . url } ` ) ;
167170 let baseApp = next ;
168171 if ( typeof this . options . url === 'string' ) {
@@ -219,7 +222,10 @@ class Server {
219222 ) ;
220223
221224 // Responsible for managing child processes.
222- this . processManager = new ProcessManager ( this . client ) ;
225+ this . processManager = new ProcessManager ( this . client , {
226+ url : this . url || '' ,
227+ baseUrl : this . baseUrl || '' ,
228+ } ) ;
223229
224230 if ( typeof this . options . config !== 'undefined' ) {
225231 const configs = Array . isArray ( this . options . config )
@@ -244,10 +250,10 @@ class Server {
244250 }
245251
246252 if ( this . options . open === true ) {
247- open ( this . url ) ;
253+ open ( this . baseUrl || '' ) ;
248254 }
249255 if ( this . options . clipboard !== false ) {
250- clipboardy . writeSync ( this . url ) ;
256+ clipboardy . writeSync ( this . baseUrl ) ;
251257 }
252258 this . base . emit ( 'ready' ) ;
253259 }
0 commit comments