13 lines
291 B
TypeScript
13 lines
291 B
TypeScript
const port = Number(process.env.PORT || 3000);
|
|
|
|
const server = Bun.serve({
|
|
port,
|
|
fetch(_req) {
|
|
return new Response("Hello via Bun!", {
|
|
headers: { "content-type": "text/plain; charset=utf-8" },
|
|
});
|
|
},
|
|
});
|
|
|
|
console.log(`Server running on http://localhost:${server.port}`);
|