mirror of
https://github.com/coollabsio/coolify-examples.git
synced 2026-03-04 12:18:58 +00:00
init 🌮
This commit is contained in:
11
bun/index.ts
Normal file
11
bun/index.ts
Normal 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}`);
|
||||
Reference in New Issue
Block a user