Something went wrong. Try again.
A CLI for publishing standard.site documents to ATProto
Something went wrong. Try again.
TypeScript
123456789101112131415161718192021222324252627282930313233343536373839404142import { Hono } from "hono";import { cors } from "hono/cors";import auth from "./routes/auth";import subscribe from "./routes/subscribe";import "./lib/path-redirect";
type Bindings = { ASSETS: Fetcher; SEQUOIA_SESSIONS: KVNamespace; CLIENT_URL: string;};
const app = new Hono<{ Bindings: Bindings }>();
app.use( "/subscribe", cors({ origin: (origin) => origin, credentials: true, }),);app.use( "/subscribe/*", cors({ origin: (origin) => origin, credentials: true, }),);
app.route("/oauth", auth);app.route("/subscribe", subscribe);
app.get("/api/health", (c) => { return c.json({ status: "ok" });});
app.all("*", (c) => { return c.env.ASSETS.fetch(c.req.raw);});
export default app;