A decentralized music tracking and discovery platform built on AT Protocol 馃幍
at main 27 lines 814 B view raw
1import { Hono } from "@hono/hono"; 2import { ctx, type AppEnv } from "./src/context.ts"; 3import { createServer } from "./src/lex/index.ts"; 4import describeFeedGenerator from "./src/api/describeFeedGenerator.ts"; 5import getFeedSkeleton from "./src/api/getFeedSkeleton.ts"; 6import health from "./src/api/health.ts"; 7import wellKnown from "./src/api/well-known.ts"; 8import { env } from "./src/utils/env.ts"; 9 10const app = new Hono<AppEnv>(); 11 12const server = createServer(); 13describeFeedGenerator(server, ctx); 14getFeedSkeleton(server, ctx); 15 16app.route("/", server.xrpc.app); 17 18app.get("/", (c) => { 19 return c.text( 20 "This is a Feed Generation service! Most endpoints are under /xrpc", 21 ); 22}); 23 24app.route("/.well-known", wellKnown); 25app.route("/", health); 26 27Deno.serve({ port: env.ROCKSKY_FEEDGEN_PORT }, app.fetch);