Skip to content

Commit

Permalink
feat: add cli instructions to invoke functions locally
Browse files Browse the repository at this point in the history
  • Loading branch information
w3b6x9 committed Nov 15, 2023
1 parent af0b2fb commit 1621e7c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions internal/functions/new/templates/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@ Deno.serve(async (req) => {
)
})

// To invoke locally:
// curl -i --location --request POST 'http://127.0.0.1:{{ .Port }}/functions/v1/{{ .Slug }}' \
// --header 'Authorization: Bearer {{ .Token }}' \
// --header 'Content-Type: application/json' \
// --data '{"name":"Functions"}'
/* To invoke locally:
1. Run `supabase start`
2. Run `supabase functions serve`
3. Make an HTTP request:
curl -i --location --request POST 'http://127.0.0.1:{{ .Port }}/functions/v1/{{ .Slug }}' \
--header 'Authorization: Bearer {{ .Token }}' \
--header 'Content-Type: application/json' \
--data '{"name":"Functions"}'
*/

0 comments on commit 1621e7c

Please sign in to comment.