mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02:33:01 +00:00
initial bun server
This commit is contained in:
11
index.ts
Normal file
11
index.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
const DEV = process.argv.find(arg => ["--dev", "--developer", "-d"].includes(arg.toLowerCase())) != null
|
||||
const PORT = process.argv.find(arg => arg.toLowerCase().startsWith("--port="))?.split("=")[1] || "3500"
|
||||
|
||||
const server = Bun.serve({
|
||||
port: Number(PORT),
|
||||
routes: {
|
||||
"/": () => new Response(`eussi - dev mode: ${DEV}`),
|
||||
}
|
||||
});
|
||||
|
||||
console.log(`eussi (issue server) listening on ${server.url}`);
|
||||
Reference in New Issue
Block a user