Lonare
Lonare

Reputation: 4683

supabase edge function using only js not ts

I am trying to write a supabase edge function with deno.

But I can see that when I run this command.

create edge function

npx supabase functions new FUNCTION-NAME

It creates a function file called index.ts but I am not comfortable with typescript.

Is there a way to create a function with on javascript?

Upvotes: 0

Views: 525

Answers (1)

Garu
Garu

Reputation: 1179

Now it's possible, you just have to add the file path in the config.toml:

[functions.hello-world]
# other entries
entrypoint = './functions/hello-world/index.js' # path must be relative to config.toml

entrypoint is available only in Supabase CLI version 1.215.0 or higher.

https://supabase.com/docs/guides/functions/quickstart#not-using-typescript

Upvotes: 0

Related Questions