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
- Function deployment failed: Unable to re...
Hi Appwrite team, I have been experiencing persistent errors when i attempt to push my appwrite functions. The logs on the deployment detail page on the console...
- Github connection error - Self Hosted Ap...
I am trying to connect my github account to deploy a project to sites, but Connect to Gtihub button is disabled. I have configured all Env variables needed for...
- "Domain verification failed"
"Domain verification failed" I was install Appwrite in my VDS server. I using Coolify for install Appwrite. After install complete, i want add my domain, and i ...