Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
!
13 changes: 13 additions & 0 deletions functions/hello.ts
Original file line number Diff line number Diff line change
@@ -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!");
}