Skip to content

Commit 5e01fdf

Browse files
committed
del rm
1 parent fe75363 commit 5e01fdf

File tree

2 files changed

+23
-71
lines changed

2 files changed

+23
-71
lines changed

packages/tracker/README.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

packages/tracker/test-server.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ const PORT = 3033;
55
const BASE_DIR = import.meta.dir;
66

77
serve({
8-
port: PORT,
9-
async fetch(req) {
10-
const url = new URL(req.url);
11-
console.log(`[Test Server] Request: ${req.method} ${url.pathname}`);
8+
port: PORT,
9+
async fetch(req) {
10+
const url = new URL(req.url);
11+
console.log(`[Test Server] Request: ${req.method} ${url.pathname}`);
1212

13-
if (url.pathname === "/") {
14-
return new Response(
15-
`
13+
if (url.pathname === "/") {
14+
return new Response(
15+
`
1616
<!DOCTYPE html>
1717
<html>
1818
<head>
@@ -23,25 +23,25 @@ serve({
2323
</body>
2424
</html>
2525
`,
26-
{
27-
headers: { "Content-Type": "text/html" },
28-
}
29-
);
26+
{
27+
headers: { "Content-Type": "text/html" },
3028
}
29+
);
30+
}
3131

32-
if (url.pathname.startsWith("/dist/")) {
33-
const filePath = join(BASE_DIR, url.pathname);
34-
console.log(`[Test Server] Serving file: ${filePath}`);
35-
const file = BunFile(filePath);
36-
if (await file.exists()) {
37-
return new Response(file);
38-
}
39-
console.error(`[Test Server] File not found: ${filePath}`);
40-
return new Response(`File not found: ${filePath}`, { status: 404 });
41-
}
32+
if (url.pathname.startsWith("/dist/")) {
33+
const filePath = join(BASE_DIR, url.pathname);
34+
console.log(`[Test Server] Serving file: ${filePath}`);
35+
const file = BunFile(filePath);
36+
if (await file.exists()) {
37+
return new Response(file);
38+
}
39+
console.error(`[Test Server] File not found: ${filePath}`);
40+
return new Response(`File not found: ${filePath}`, { status: 404 });
41+
}
4242

43-
return new Response("Not Found", { status: 404 });
44-
},
43+
return new Response("Not Found", { status: 404 });
44+
},
4545
});
4646

4747
console.log(`Test server running on http://localhost:${PORT}`);

0 commit comments

Comments
 (0)