duck2 / src /api /routes /index.ts
Alcex
1
b537ab8
raw
history blame contribute delete
662 Bytes
import fs from 'fs-extra';
import Response from '@/lib/response/Response.ts';
import chat from "./chat.ts";
import token from "./token.ts";
import images from "./images.ts";
import ping from "./ping.ts";
import models from './models.ts';
export default [
{
get: {
'/': async () => {
const content = await fs.readFile('public/welcome.html');
return new Response(content, {
type: 'html',
headers: {
Expires: '-1'
}
});
}
}
},
chat,
images,
token,
ping,
models
];