Skip to content

Commit 6af7719

Browse files
authored
Update get-started.mdx
1 parent 408a186 commit 6af7719

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/content/docs/workers/testing/miniflare/get-started.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ const res = await mf.dispatchFetch("http://localhost:8787/", {
150150
});
151151
console.log(await res.text()); // Hello Miniflare!
152152

153+
const worker = await mf.getWorker();
154+
153155
const scheduledResult = await worker.scheduled({
154156
cron: "* * * * *",
155157
});
@@ -367,6 +369,8 @@ const res = await mf.dispatchFetch("http://localhost:8787/", {
367369
});
368370
const text = await res.text();
369371

372+
const worker = await mf.getWorker();
373+
370374
// Dispatch "scheduled" event to worker
371375
const scheduledResult = await worker.scheduled({ cron: "30 * * * *" })
372376

0 commit comments

Comments
 (0)