owltide/server/api/schedule.ts
Hornwitser 250ca9a1ac Port application from Next.js to Nuxt
Nuxt is based on Vue.js and I find their building blocks to be much
neater compared to the React based Next.js.
2025-03-05 15:36:50 +01:00

6 lines
228 B
TypeScript

import { readFile } from "node:fs/promises";
import { Schedule } from "~/shared/types/schedule";
export default defineEventHandler(async (event) => {
return JSON.parse(await readFile("schedule.json", "utf-8")) as Schedule;
})