Skip to content

Commit

Permalink
Merge pull request #13 from pulsate-dev/revert
Browse files Browse the repository at this point in the history
Revert #12
  • Loading branch information
m1sk9 authored Aug 13, 2024
2 parents 4139e78 + 9179d87 commit 9e3ee4d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 42 deletions.
Binary file modified bun.lockb
Binary file not shown.
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -21,7 +21,7 @@
"postinstall": "lefthook install"
},
"dependencies": {
"elysia": "^1.1.6",
"hono": "^4.1.3",
"lefthook": "^1.6.7"
},
"devDependencies": {
Expand All @@ -31,8 +31,5 @@
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"trustedDependencies": [
"@biomejs/biome"
]
}
}
76 changes: 41 additions & 35 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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<Response> {
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;

0 comments on commit 9e3ee4d

Please sign in to comment.