This commit is contained in:
2025-12-26 19:22:18 +08:00
parent 3a3e69102a
commit c692d0c19d

View File

@@ -9,9 +9,18 @@ import * as schema from './db/schema.ts';
export const config = useConfig() export const config = useConfig()
export const app = useConfigKey<App>('app', () => new App({ export const app = useConfigKey<App>('app', () => new App({
serverOptions: {
cors: {
origin: '*',
}
}
})) }))
app.router.createRouteList(); app.route({
path: 'router',
key: 'list'
}).define(async (ctx) => {
ctx.body = app.router.getList();
}).addTo(app);
export const db = useConfigKey('db', () => { export const db = useConfigKey('db', () => {
const sqlite = new Database(config.DATABASE_URL || 'storage/browser-helper/data.sqlite3'); const sqlite = new Database(config.DATABASE_URL || 'storage/browser-helper/data.sqlite3');