summaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
Diffstat (limited to 'std')
-rwxr-xr-xstd/http/file_server.ts2
-rw-r--r--std/http/file_server_test.ts10
2 files changed, 6 insertions, 6 deletions
diff --git a/std/http/file_server.ts b/std/http/file_server.ts
index ded930db5..6a2d76805 100755
--- a/std/http/file_server.ts
+++ b/std/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<string, string> = {
".md": "text/markdown",
diff --git a/std/http/file_server_test.ts b/std/http/file_server_test.ts
index 7a3699337..07c8618c1 100644
--- a/std/http/file_server_test.ts
+++ b/std/http/file_server_test.ts
@@ -36,7 +36,7 @@ function killFileServer(): void {
test("file_server serveFile", async (): Promise<void> => {
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<void> => {
test("serveDirectory", async function (): Promise<void> {
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<void> {
test("serveFallback", async function (): Promise<void> {
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<void> {
test("serveWithUnorthodoxFilename", async function (): Promise<void> {
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);