MCPcopy Create free account
hub / github.com/MonoYan/open-medkit / createApp

Function createApp

backend/src/middleware/apiKey.test.ts:6–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4import { type AiEnv, apiKeyMiddleware } from './apiKey';
5
6function createApp() {
7 const app = new Hono<AiEnv>();
8 app.use('*', apiKeyMiddleware);
9 app.get('/test', (c) =>
10 c.json({
11 aiApiKey: c.get('aiApiKey'),
12 aiBaseUrl: c.get('aiBaseUrl'),
13 aiModel: c.get('aiModel'),
14 }),
15 );
16 return app;
17}
18
19describe('apiKeyMiddleware', () => {
20 const originalEnv = { ...process.env };

Callers 1

apiKey.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected