From 1ffdbe83764131f69078a4b2b5e9eebc2aa5deef Mon Sep 17 00:00:00 2001 From: jbwcloudflare <90648441+jbwcloudflare@users.noreply.github.com> Date: Fri, 25 Feb 2022 09:30:12 -0600 Subject: [PATCH 1/3] Update README.md --- docs/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/README.md b/docs/README.md index 506c67e64..c68659359 100644 --- a/docs/README.md +++ b/docs/README.md @@ -5,3 +5,4 @@ Built with https://content.nuxtjs.org Run `yarn dev` to work on this. Content is in `/content` directory, markup/styling is in `/pages/_.vue` and `/components`, using [Tailwind](https://tailwindcss.com/) for theming. See https://fab.dev/guides/contributing#documentation for more info. +! From a4b0b431ba4c06e328b97c0b48671182ab2d327b Mon Sep 17 00:00:00 2001 From: jbwcloudflare <90648441+jbwcloudflare@users.noreply.github.com> Date: Mon, 28 Feb 2022 10:01:53 -0600 Subject: [PATCH 2/3] Create hello.ts --- functions/hello.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 functions/hello.ts diff --git a/functions/hello.ts b/functions/hello.ts new file mode 100644 index 000000000..c2808dd88 --- /dev/null +++ b/functions/hello.ts @@ -0,0 +1,13 @@ +export async function onRequest(context) { + // Contents of context object + const { + request, // same as existing Worker API + env, // same as existing Worker API + params, // if filename includes [id] or [[path]] + waitUntil, // same as ctx.waitUntil in existing Worker API + next, // used for middleware or to fetch assets + data, // arbitrary space for passing data between middlewares + } = context; + + return new Response("Hello, world!"); +} From d256594135be446747e788121f73bc744a20ed69 Mon Sep 17 00:00:00 2001 From: jbwcloudflare <90648441+jbwcloudflare@users.noreply.github.com> Date: Mon, 28 Feb 2022 10:05:04 -0600 Subject: [PATCH 3/3] Update hello.ts --- functions/hello.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/hello.ts b/functions/hello.ts index c2808dd88..a172821a1 100644 --- a/functions/hello.ts +++ b/functions/hello.ts @@ -1,5 +1,5 @@ export async function onRequest(context) { - // Contents of context object + // Contents of context object: const { request, // same as existing Worker API env, // same as existing Worker API