txtdot/src/routes/index.ts
2023-08-16 12:07:12 +03:00

10 lines
346 B
TypeScript

import { FastifyInstance } from "fastify";
import { engineList } from "../handlers/main";
import { indexSchema } from "../types/requests";
export default async function indexRoute(fastify: FastifyInstance) {
fastify.get("/", { schema: indexSchema }, async (_, reply) => {
return reply.view("/templates/index.ejs", { engineList });
});
}