bsd/app/api/config/route.ts
2024-12-13 19:46:49 +08:00

13 lines
287 B
TypeScript

import { promises as fs } from 'fs'
import { NextResponse } from 'next/server'
export async function GET() {
const file = await fs.readFile(process.cwd() + '/data/config.yaml', 'utf8')
return new NextResponse(file, {
headers: {
'Content-Type': 'text/yaml',
},
})
}