hailuo / src /api /routes /index.ts
gitdeem's picture
Upload 38 files
2162a57 verified
raw
history blame contribute delete
687 Bytes
import fs from 'fs-extra';
import Response from '@/lib/response/Response.ts';
import chat from "./chat.ts";
import audio from './audio.ts';
import ping from "./ping.ts";
import token from './token.js';
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,
audio,
ping,
token,
models
];