addeds embeds for profiles

This commit is contained in:
Rose 2024-10-16 09:45:26 -05:00
parent c90a4c141e
commit 5b5e21e614
No known key found for this signature in database
9 changed files with 1006 additions and 896 deletions

View file

@ -5,7 +5,9 @@ import { serve } from "@hono/node-server";
import { Hono } from "hono";
import { HTTPException } from "hono/http-exception";
import { Redis } from "ioredis";
import { getOEmbed } from "./routes/getOEmbed.ts";
import { getPost } from "./routes/getPost.tsx";
import { getProfile } from "./routes/getProfile.tsx";
// biome-ignore lint/style/noNonNullAssertion: check is ran at app start
const redis = new Redis(6379, process.env.REDIS_HOSTNAME!);
@ -58,6 +60,11 @@ app.use("*", async (c, next) => {
app.get("/profile/:user/post/:post", getPost);
app.get("/https://bsky.app/profile/:user/post/:post", getPost);
app.get("/profile/:user", getProfile);
app.get("/https://bsky.app/profile/:user", getProfile);
app.get("/oembed", getOEmbed);
serve(
{
...app,