diff --git a/http/file_server.ts b/http/file_server.ts index ded930db50cf..6a2d76805626 100755 --- a/http/file_server.ts +++ b/http/file_server.ts @@ -37,7 +37,7 @@ const serverArgs = parse(args) as FileServerArgs; const CORSEnabled = serverArgs.cors ? true : false; const target = posix.resolve(serverArgs._[1] ?? ""); -const addr = `0.0.0.0:${serverArgs.port ?? serverArgs.p ?? 4500}`; +const addr = `0.0.0.0:${serverArgs.port ?? serverArgs.p ?? 4507}`; const MEDIA_TYPES: Record = { ".md": "text/markdown", diff --git a/http/file_server_test.ts b/http/file_server_test.ts index 7a369933771d..07c8618c1143 100644 --- a/http/file_server_test.ts +++ b/http/file_server_test.ts @@ -36,7 +36,7 @@ function killFileServer(): void { test("file_server serveFile", async (): Promise => { await startFileServer(); try { - const res = await fetch("http://localhost:4500/README.md"); + const res = await fetch("http://localhost:4507/README.md"); assert(res.headers.has("access-control-allow-origin")); assert(res.headers.has("access-control-allow-headers")); assertEquals(res.headers.get("content-type"), "text/markdown"); @@ -53,7 +53,7 @@ test("file_server serveFile", async (): Promise => { test("serveDirectory", async function (): Promise { await startFileServer(); try { - const res = await fetch("http://localhost:4500/"); + const res = await fetch("http://localhost:4507/"); assert(res.headers.has("access-control-allow-origin")); assert(res.headers.has("access-control-allow-headers")); const page = await res.text(); @@ -75,7 +75,7 @@ test("serveDirectory", async function (): Promise { test("serveFallback", async function (): Promise { await startFileServer(); try { - const res = await fetch("http://localhost:4500/badfile.txt"); + const res = await fetch("http://localhost:4507/badfile.txt"); assert(res.headers.has("access-control-allow-origin")); assert(res.headers.has("access-control-allow-headers")); assertEquals(res.status, 404); @@ -88,12 +88,12 @@ test("serveFallback", async function (): Promise { test("serveWithUnorthodoxFilename", async function (): Promise { await startFileServer(); try { - let res = await fetch("http://localhost:4500/http/testdata/%"); + let res = await fetch("http://localhost:4507/http/testdata/%"); assert(res.headers.has("access-control-allow-origin")); assert(res.headers.has("access-control-allow-headers")); assertEquals(res.status, 200); let _ = await res.text(); - res = await fetch("http://localhost:4500/http/testdata/test%20file.txt"); + res = await fetch("http://localhost:4507/http/testdata/test%20file.txt"); assert(res.headers.has("access-control-allow-origin")); assert(res.headers.has("access-control-allow-headers")); assertEquals(res.status, 200);