This commit is contained in:
2025-12-29 14:42:48 +08:00
parent a90f98ef3f
commit 3de89b6985
3 changed files with 12 additions and 2 deletions

View File

@@ -61,3 +61,13 @@ export const app: App = useContextKey<App>('app', () => {
},
});
});
app.route({
path: 'router',
key: 'list',
description: '获取路由列表',
}).define(async (ctx) => {
const list = ctx.app.getList()
ctx.body = { list }
}).addTo(app);

View File

@@ -57,6 +57,7 @@ export const runServer = async (port: number = 51515, listenPath = '127.0.0.1')
});
manager.initRemoteApp()
}, 1000);
return {
app,
port: _port,