MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / applyApiHandler

Function applyApiHandler

framework/framework/api.ts:272–278  ·  view source on GitHub ↗
(ctx: Context, name: string, path: string)

Source from the content-addressed store, hash-verified

270}
271
272export async function applyApiHandler(ctx: Context, name: string, path: string) {
273 ctx.plugin(ApiService);
274 await ctx.inject(['server', 'api'], ({ Route, Connection }) => {
275 Route(name, path, ApiHandler);
276 Connection(`${name}_conn`, `${path}/conn`, ApiConnectionHandler);
277 });
278}
279
280const TestApis = {
281 'test.query': Query(Schema.object({

Callers 1

applyFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected