Search code examples
dartappwrite

How to write appwrite.json for dart ? with function that has (execution permission, env variables )


I need an example of appwrite.json that uses dart as run time and has function with execution permission, env variables

I tried appwrite cli to create a env variable but not showing in the appwrite.json file.


Solution

  • It should look something like:

    {
      "$id": "123asdf",
      "runtime": "dart-2.17",
      // ... other stuff
      "execute": ["users"],
      "variables": {
        "FIRST_VAR": "value",
        "SECOND_VAR": "value"
      }
    }
    

    For more info, refer to the appwrite.json docs.