diff --git a/src/app.ts b/src/app.ts index be35b86..82f7d1e 100644 --- a/src/app.ts +++ b/src/app.ts @@ -9,9 +9,18 @@ import * as schema from './db/schema.ts'; export const config = useConfig() export const app = useConfigKey('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', () => { const sqlite = new Database(config.DATABASE_URL || 'storage/browser-helper/data.sqlite3');