MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / createApp

Function createApp

services/cloud-agent-next/src/middleware/balance.test.ts:51–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49 kiloSessionId: 'ses_12345678901234567890123456',
50 organizationId: 'org-current',
51 });
52 });
53
54 function createApp() {
55 const app = new Hono<HonoContext>();
56 app.use('/trpc/*', async (c, next) => {
57 c.set('userId', 'user-123');
58 c.set('authToken', 'token-123');
59 await next();
60 });
61 app.use('/trpc/*', balanceMiddleware);
62 app.post('/trpc/:procedure', c =>
63 c.json({ ok: true, validatedSessionAccess: c.get('validatedSessionAccess') })
64 );
65 return app;
66 }

Callers 1

postTrpcFunction · 0.70

Calls 5

postMethod · 0.80
setMethod · 0.65
jsonMethod · 0.65
getMethod · 0.65
nextFunction · 0.50

Tested by

no test coverage detected