mirror of
https://github.com/coollabsio/coolify-examples.git
synced 2026-02-22 07:18:58 +00:00
add compose erxample
This commit is contained in:
16
docker-compose/index.ts
Normal file
16
docker-compose/index.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
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 === "/envs") {
|
||||
return new Response(JSON.stringify(process.env, null, 2), {
|
||||
headers: { "content-type": "application/json" },
|
||||
});
|
||||
|
||||
};
|
||||
return new Response("404!");
|
||||
},
|
||||
})
|
||||
console.log(`Server running at http://localhost:${PORT}`);
|
||||
Reference in New Issue
Block a user