MCPcopy
hub / github.com/triggerdotdev/trigger.dev / createApp

Function createApp

runtime_tests/tests/deno/trigger.test.ts:9–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7import { assertEquals } from "./deps.ts";
8
9function createApp() {
10 const client = new TriggerClient({
11 id: "wrangler-test",
12 apiKey: "tr_dev_test-api-key",
13 apiUrl: "http://localhost:3030",
14 });
15
16 const app = new Hono();
17
18 client.defineJob({
19 id: "wrangler-job",
20 name: "Wrangler Job",
21 version: "1.0.0",
22 trigger: invokeTrigger(),
23 run: async () => {},
24 });
25
26 app.use("/api/trigger", createMiddleware(client));
27
28 return app;
29}
30
31Deno.test("Deno", async () => {
32 const app = createApp();

Callers 1

trigger.test.tsFile · 0.70

Calls 4

defineJobMethod · 0.95
invokeTriggerFunction · 0.85
useMethod · 0.80
createMiddlewareFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…