MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / registerWebAssetRoutes

Function registerWebAssetRoutes

packages/server/src/routes/webAssets.ts:14–22  ·  view source on GitHub ↗
(
  app: WebAssetRouteHost,
  assetsDir: string,
)

Source from the content-addressed store, hash-verified

12}
13
14export async function registerWebAssetRoutes(
15 app: WebAssetRouteHost,
16 assetsDir: string,
17): Promise<void> {
18 await assertWebAssets(assetsDir);
19
20 app.get('/', async (req, reply) => serveWebAsset(req, reply, assetsDir));
21 app.get('/*', async (req, reply) => serveWebAsset(req, reply, assetsDir));
22}
23
24async function assertWebAssets(assetsDir: string): Promise<void> {
25 try {

Callers 1

startServerFunction · 0.90

Calls 3

assertWebAssetsFunction · 0.85
serveWebAssetFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected