diff --git a/bun.lockb b/bun.lockb index 727d1be..30278ce 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index a59336d..71ac7c8 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "url": "https://pulsate.dev" }, "scripts": { - "dev": "bun run --watch src/index.ts", - "start": "NODE_ENV=production bun run build/index.js", + "dev": "bun run src/index.ts", + "start": "bun run build/index.js", "build": "bun build --entrypoints ./src/index.ts --outdir ./build --target bun", "format": "bunx @biomejs/biome format --write ./src", "lint": "bunx @biomejs/biome lint ./src", @@ -21,7 +21,7 @@ "postinstall": "lefthook install" }, "dependencies": { - "elysia": "^1.1.6", + "hono": "^4.1.3", "lefthook": "^1.6.7" }, "devDependencies": { @@ -31,8 +31,5 @@ }, "peerDependencies": { "typescript": "^5.0.0" - }, - "trustedDependencies": [ - "@biomejs/biome" - ] + } } diff --git a/src/index.ts b/src/index.ts index 74c68f2..6e73352 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,35 +1,41 @@ -import { Elysia } from "elysia"; - -const app = new Elysia(); - -app - .get("/", ({ redirect }) => { - return redirect("https://pulsate.dev", 302); - }) - .get("/docs", ({ redirect }) => { - return redirect("https://docs.pulsate.dev", 302); - }) - .get("/api", ({ redirect }) => { - return redirect("https://api.pulsate.dev/reference", 302); - }) - .get("/discord", ({ redirect }) => { - return redirect("https://discord.gg/NmczMnWGvh", 302); - }) - .get("/github", ({ redirect }) => { - return redirect("https://github.com/pulsate-dev", 302); - }) - .get("/x", ({ redirect }) => { - return redirect("https://x.com/pulsate_dev", 302); - }) - .get("/youtube", ({ redirect }) => { - return redirect("https://youtube.com/@pulsate-dev", 302); - }) - .get("/discussions", ({ redirect }) => { - return redirect("https://github.com/orgs/pulsate-dev/discussions", 302); - }); - -export default { - async fetch(request: Request): Promise { - return await app.fetch(request); - }, -}; +import { Hono } from "hono"; + +const app = new Hono(); + +app.get("/", (c) => { + return c.redirect("https://pulsate.dev", 302); +}); + +app.get("/docs", (c) => { + return c.redirect("https://docs.pulsate.dev", 302); +}); + +app.get("/api", (c) => { + return c.redirect("https://api.pulsate.dev/reference", 302); +}); + +app.get("/discord", (c) => { + return c.redirect("https://discord.gg/NmczMnWGvh", 302); +}); + +app.get("/github", (c) => { + return c.redirect("https://github.com/pulsate-dev/", 302); +}); + +app.get("/x", (c) => { + return c.redirect("https://x.com/pulsate_dev", 302); +}); + +app.get("/youtube", (c) => { + return c.redirect("https://youtube.com/@pulsate-dev", 302); +}); + +app.get("/bluesky", (c) => { + return c.redirect("https://bsky.app/profile/pulsate.dev", 302); +}); + +app.get("/discussions", (c) => { + return c.redirect("https://github.com/orgs/pulsate-dev/discussions", 302); +}); + +export default app;