File tree Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -224,8 +224,7 @@ describe("config", () => {
224
224
beforeEach ( ( ) => {
225
225
const userConfigData = {
226
226
includePrivate : true ,
227
- address : "localhost" ,
228
- family : "IPv4" ,
227
+ host : "localhost" ,
229
228
port : 9999 ,
230
229
} ;
231
230
resetFiles ( ) ;
@@ -236,8 +235,7 @@ describe("config", () => {
236
235
const userConfig = await config . getUserConfig ( ) ;
237
236
expect ( userConfig ) . toStrictEqual ( {
238
237
includePrivate : true ,
239
- address : "localhost" ,
240
- family : "IPv4" ,
238
+ host : "localhost" ,
241
239
port : 9999 ,
242
240
} ) ;
243
241
} ) ;
@@ -252,8 +250,7 @@ describe("config", () => {
252
250
const userConfig = await config . getUserConfig ( ) ;
253
251
expect ( userConfig ) . toStrictEqual ( {
254
252
includePrivate : false ,
255
- address : "localhost" ,
256
- family : "IPv4" ,
253
+ host : "localhost" ,
257
254
port : 8888 ,
258
255
} ) ;
259
256
} ) ;
Original file line number Diff line number Diff line change @@ -14,8 +14,7 @@ interface Options {
14
14
15
15
type UserConfig = {
16
16
includePrivate : boolean ;
17
- address : string ;
18
- family : string ;
17
+ host : string ;
19
18
port : number ;
20
19
} ;
21
20
@@ -109,8 +108,7 @@ class Config {
109
108
async getUserConfig ( ) {
110
109
const defaultConfig = {
111
110
includePrivate : false ,
112
- address : "localhost" ,
113
- family : "IPv4" ,
111
+ host : "localhost" ,
114
112
port : 8888 ,
115
113
} as UserConfig ;
116
114
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export async function startServer() {
34
34
const server = createServer ( app ) ;
35
35
const userConfig = await config . getUserConfig ( ) ;
36
36
const port = userConfig . port ;
37
- const host = "localhost" ;
37
+ const host = userConfig . host ;
38
38
39
39
return new Promise < Server > ( ( resolve , reject ) => {
40
40
server
You can’t perform that action at this time.
0 commit comments