mirror of
https://github.com/coollabsio/coolify-examples.git
synced 2026-02-18 21:38:58 +00:00
11 lines
364 B
TypeScript
11 lines
364 B
TypeScript
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}`); |