-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
54 lines (47 loc) Β· 2.4 KB
/
Copy pathserver.js
File metadata and controls
54 lines (47 loc) Β· 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
const server = Bun.serve({
port: 3000,
async fetch(req) {
const url = new URL(req.url);
const path = url.pathname === "/" ? "/index.html" : url.pathname;
const file = Bun.file(import.meta.dir + path);
if (await file.exists()) return new Response(file);
return new Response("Not found", { status: 404 });
},
});
const t = (s) => `\x1b[36m${s}\x1b[0m`; // teal
const y = (s) => `\x1b[33m${s}\x1b[0m`; // yellow
const b = (s) => `\x1b[1m${s}\x1b[0m`; // bold
const d = (s) => `\x1b[2m${s}\x1b[0m`; // dim
const w = (s) => `\x1b[97m${s}\x1b[0m`; // bright white
// L: 18 visible chars each. Face box: β at col 2 & 13, 10-char content inside.
// G: 33 visible chars each (3-char row label + 1 border + 7Γ(3-char cell + 1 border) = 33).
const L = [
` `,
` ${t("ββββββββββββ")} `,
` ${t("β")} ${y("β
BLIP β
")} ${t("β")} `,
` ${t("ββββ¦βββββ¦βββ")} `,
` ${t("ββββ©βββββ©βββ")} `,
` ${t("β")}${w("(β’)")}${t("βββ")} ${d("[β ]")}${t("β")} `,
` ${t("β")} ${d("Β·ββββββΒ·")} ${t("β")} `,
` ${t("β")} ${t("\\__/")} ${t("β")} `,
` ${t("ββββββββββββ")} `,
` `,
];
const G = [
` A B C D E F G `,
` βββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ¬ββββ`,
` 1 β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β`,
` βββββΌββββΌββββΌββββΌββββΌββββΌββββ€`,
` 2 β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β`,
` βββββΌββββΌββββΌββββΌββββΌββββΌββββ€`,
` 3 β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β`,
` βββββΌββββΌββββΌββββΌββββΌββββΌββββ€`,
` 4 β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β ${t("~")} β`,
` βββββ΄ββββ΄ββββ΄ββββ΄ββββ΄ββββ΄ββββ`,
];
const art = L.map((l, i) => l + G[i]).join("\n");
console.log(`
${art}
${b("B L I P !")} ${d("β hunt the hidden beasts")}
${d(`β http://localhost:${server.port}`)}
`);