mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-03-13 10:30:18 +08:00
22 lines
412 B
TypeScript
22 lines
412 B
TypeScript
import { setConfig } from '@/config';
|
|
import { Hono } from 'hono';
|
|
|
|
let app: Hono;
|
|
|
|
export const init = async (conf) => {
|
|
setConfig(
|
|
Object.assign(
|
|
{
|
|
IS_PACKAGE: true,
|
|
},
|
|
conf
|
|
)
|
|
);
|
|
app = (await import('@/app')).default;
|
|
};
|
|
|
|
export const request = async (path) => {
|
|
const res = await app.request(path);
|
|
return res.json();
|
|
};
|