Hello. I just updated my Appwrite server (1.4.13) and appwrite-cli (4.2.0). Still, if I create a cloud-function using appwrite init function --verbose
for the dart runtime it produces sample code with errors.
The "process" in the following code is unknown:
final client = Client()
.setEndpoint('https://cloud.appwrite.io/v1')
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
.setKey(process.env.APPWRITE_API_KEY);
what version of dart?
oops fail...looks like that commented code is incorrect...Would you please create a github issue for that?
thanks! so, as i mentioned, the syntax isn't right for dart. Please see our docs for the right syntax: https://appwrite.io/docs/products/functions/development#environment-variables
Thank you! I don't know why I didn't get it working before since I checked the docs back and forth. Anyway, my fault.
not your fault. the template/starter code is incorrect
But your docs are correct and I saw it before but for whatever reason didn't get it work. Anyway, now everything makes sense π
Recommended threads
- Having issues with login via CLI
``` ~/appwrite ξ° appwrite login --endpoint https://localhost/v1 --verbose ? Enter your email myvalidemai...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...