code-share/server/api/index.ts

17 lines
405 B
TypeScript
Raw Normal View History

2024-02-22 12:14:58 +00:00
import { Router } from "express";
import preview from "./preview";
import trpc from "./trpc/handler";
2024-02-24 04:38:19 +00:00
import { thumbnail } from "./thumbnail";
2024-02-26 10:48:17 +00:00
import sandbox from "./sandbox";
import { nocache } from "../middlewares/nocache";
2024-02-22 12:14:58 +00:00
const api = Router();
api.use("/trpc", trpc);
api.use("/preview", nocache, preview);
2024-02-26 10:48:17 +00:00
api.use("/sandbox", sandbox);
2024-02-22 12:14:58 +00:00
2024-02-24 04:38:19 +00:00
api.get("/thumbnail/:slug", thumbnail);
2024-02-22 12:14:58 +00:00
export default api;