#deploy function with dart
19 messages · Page 1 of 1 (latest)
I believe there's a starter example using dart function, check appwrite console -> function
ahh my question is not how to create a function, my question is if I can use instead of the appwrite node.js cli the appwrite_dart sdk to "create/upload" my function code
something like this:
-- appwrite_dart_create_script
-- -- functions
-- -- -- my_function_dart
-- -- -- -- function code...
-- deploy_script.dart // uses the appwrite_dart sdk to deploy my_function_dart dircectory
You can use the appwrite CLI to create dart function and deploy them
I know, my question is if I can deploy them with dart not with the cli
you mean to upload a dart function via dart? you can do that via the server side sdk.
how?
Why? 🧐
I have a deploy script where I create db's/collections/admin user etc. so I wanna add to that script the function I wrote
I don't really get it how to add my dart directory here...
You can always take a look at the Console network logs or CLI source code to see what API calls are made. Then, do the same using the server SDK
For example, one API call you'd make is https://appwrite.io/docs/references/cloud/server-dart/functions#createDeployment
thx
for the depoyment, can I also provide a path instead of a file for the "code" key?