init 🌮

This commit is contained in:
Andras Bacsai
2024-03-04 14:07:59 +01:00
commit d83b3c0b62
22 changed files with 11028 additions and 0 deletions

11
bun/index.ts Normal file
View File

@@ -0,0 +1,11 @@
const PORT = process.env.PORT || 3000;
Bun.serve({
port: PORT,
fetch(req) {
const url = new URL(req.url);
if (url.pathname === "/") return new Response("Home page!");
if (url.pathname === "/blog") return new Response("Blog!");
return new Response("404!");
},
})
console.log(`Server running at http://localhost:${PORT}`);