Back

How to add function dependencies?

  • 0
  • Functions
dammy
19 Apr, 2023, 22:00

unlike normal variable files, how do I add a phpfile that depends on a library?

TL;DR
User is asking how to add function dependencies. They mention wanting to store the dependencies in a function variable and provide a link to the function docs. They also mention using the Appwrite CLI tool to manage the function life-cycle. They ask for suggestions and if it is safe to store API and authentication in the dart project. They ask how to package the file for dart or php and mention only seeing an example for JavaScript in the manual deployment. They ask about initializing a function using the CLI and what to do if the project has dependencies. They ask how to add a PHP file that depends on a library. Solution: The user can refer to
Drake
19 Apr, 2023, 22:15

I'm not quite sure what you mean...If you initialize a PHP function (https://appwrite.io/docs/functions#gettingStarted) you can see how it uses the Appwrite PHP package

dammy
3 May, 2023, 14:57

I meant what if the project has dependencies? @Steven

Drake
3 May, 2023, 15:13

Did you initialize a function using the CLI?

dammy
3 May, 2023, 15:28

Using the UI on the dashboard.

How am I to package the file for dart or php? Using manual deployment, I only saw an example for JavaScript

dammy
3 May, 2023, 15:29

Besides will it be safe to store API and authentication that the cloud function uses to third party API inside the dart project as class? @Steven

dammy
3 May, 2023, 16:00

Any suggestion @Binyamin ?

Binyamin
3 May, 2023, 16:16

It's best to create and manage the function life-cycle using Appwrite CLI tool. It will be much easier in the long run.

You can read this https://discord.com/channels/564160730845151244/1095282924355588168/1095382752242716813

Drake
3 May, 2023, 16:23

This should be stored in a function variable. Please make sure to read and follow the function docs: https://appwrite.io/docs/functions

Drake
3 May, 2023, 16:37

How to add function dependencies?

dammy
4 May, 2023, 05:46

I appreciate you all @Binyamin @Steven

safwan
4 May, 2023, 06:27

@dammy checking in to see if your issue is resolved? 😄

dammy
4 May, 2023, 11:51

??? @safwan

safwan
4 May, 2023, 14:12

is your issue fixed, or do you need more help?

dammy
14 May, 2023, 20:51

Not yet @safwan

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