Back

what shoud i give in the app write path for execution my Custom body??

  • 0
  • Web
kusal
4 Mar, 2024, 15:14

shoud i give the localhost path or what ??

TL;DR
Developers are discussing how to execute custom functions in an app. To do this, proper paths are essential depending on the code's structure. The solution shared is to deploy the function using appwrite deploy function and connecting it via Git for automatic builds. Ensure to check out the documentation for more guidance: https://appwrite.io/docs/products/functions.
fafa
4 Mar, 2024, 15:16

What does your code look like and what are you trying to achieve?

fafa
4 Mar, 2024, 15:16

Also, you need to create a deployment

fafa
4 Mar, 2024, 15:16
fafa
4 Mar, 2024, 15:17
kusal
4 Mar, 2024, 15:18

appwrite login
appwrite init project

appwrite init function
appwrite deploy function

alraedy i have run all these commands

Kenny
4 Mar, 2024, 15:19

You would only need a path if within the function you are handling those paths. If your logic is just in the root, no path is required.

fafa
4 Mar, 2024, 15:19

Yeah but there's also no deployment

fafa
4 Mar, 2024, 15:19

so the execute will do nothing

kusal
4 Mar, 2024, 15:19

should i coonect with sdk from cli

Kenny
4 Mar, 2024, 15:19

Sure :P But that wasn't the question teehee

fafa
4 Mar, 2024, 15:20

haha

fafa
4 Mar, 2024, 15:20

Honestly, make a git repo and connect it, it's the best way and it auto-builds on each commit

fafa
4 Mar, 2024, 15:20

personal opinion*

kusal
4 Mar, 2024, 15:21

ok i will try it ,but after running all these commands what other things i need to do for execution the function

Kenny
4 Mar, 2024, 15:21

That realistically should be all you need, appwrite deploy function should deploy the function to cloud and trigger a build.

fafa
4 Mar, 2024, 15:22

If you connect it via git, just go to the function url, it auto-executes or use the path /, but that depends on your code, looking at yours it seems you don't have any paths, so / is fine

kusal
4 Mar, 2024, 15:23

ok

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more