diff --git a/docs/README.md b/docs/README.md index 506c67e6..c6865935 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. +! diff --git a/functions/hello.ts b/functions/hello.ts new file mode 100644 index 00000000..a172821a --- /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!"); +}