Skip to content

Commit d74b3ae

Browse files
author
ikepu-tp
committed
change from address to host
1 parent f3bc010 commit d74b3ae

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

src/lib/config.test.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,7 @@ describe("config", () => {
224224
beforeEach(() => {
225225
const userConfigData = {
226226
includePrivate: true,
227-
address: "localhost",
228-
family: "IPv4",
227+
host: "localhost",
229228
port: 9999,
230229
};
231230
resetFiles();
@@ -236,8 +235,7 @@ describe("config", () => {
236235
const userConfig = await config.getUserConfig();
237236
expect(userConfig).toStrictEqual({
238237
includePrivate: true,
239-
address: "localhost",
240-
family: "IPv4",
238+
host: "localhost",
241239
port: 9999,
242240
});
243241
});
@@ -252,8 +250,7 @@ describe("config", () => {
252250
const userConfig = await config.getUserConfig();
253251
expect(userConfig).toStrictEqual({
254252
includePrivate: false,
255-
address: "localhost",
256-
family: "IPv4",
253+
host: "localhost",
257254
port: 8888,
258255
});
259256
});

src/lib/config.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ interface Options {
1414

1515
type UserConfig = {
1616
includePrivate: boolean;
17-
address: string;
18-
family: string;
17+
host: string;
1918
port: number;
2019
};
2120

@@ -109,8 +108,7 @@ class Config {
109108
async getUserConfig() {
110109
const defaultConfig = {
111110
includePrivate: false,
112-
address: "localhost",
113-
family: "IPv4",
111+
host: "localhost",
114112
port: 8888,
115113
} as UserConfig;
116114

src/server/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export async function startServer() {
3434
const server = createServer(app);
3535
const userConfig = await config.getUserConfig();
3636
const port = userConfig.port;
37-
const host = "localhost";
37+
const host = userConfig.host;
3838

3939
return new Promise<Server>((resolve, reject) => {
4040
server

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy