
I'd like some help on how reach appwrite (api) from a function on my local dev machine. Essentially can anyone help me with the endpoint to use for the SDK Client in my local function? That is for
final client = Client().setEndpoint('https://localhost/v1')
I've tried:
- My local ip
http://192.168.1.11/v1
- appwrite service name (from compose)
http//:appwrite/v1
- Localhost
http://localhost/v1
(doesn't work obviously)
But from this message it seems Steven got it to work but I just can't seem to figure it out. This is frustrating because I know I'm missing something simple here.
https://discord.com/channels/564160730845151244/1094376924882685962/1094515291117064263

The local IP should work...maybe use https? What's the error you get?
Also, are you using windows?

I'm using Linux. I've tried both http and https.

Initially I was getting this error when I was using https://localhost/v1
:
AppwriteException: , Connection failed (0) #0 ClientIO.call (package:dart_appwrite/src/client_io.dart:233)
<asynchronous suspension>
#1 Databases.listDocuments (package:dart_appwrite/services/databases.dart:1016)
<asynchronous suspension>
#2 getClassIdIfExists (package:starter_template/main.dart:92)
<asynchronous suspension>
#3 main (package:starter_template/main.dart:44)
<asynchronous suspension>
#4 Future.any.onValue (dart:async/future.dart:615)
<asynchronous suspension>
type 'Null' is not a subtype of type 'int' of 'statusCode'
#0 main (package:starter_template/main.dart)
<asynchronous suspension>
#1 Future.any.onValue (dart:async/future.dart:615)
<asynchronous suspension>
But after updating it to the local ip I'm getting Execution timed out.

How'd you install docker?

Using the docker run command from the docs for v1.4.13

Docker, not Appwrite

I copied the command from appwrite's docs

Here's the command, still have it in my history:
docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="upgrade" \
appwrite/appwrite:1.4.13

Btw what did you mean by host.docker.internal
working for you? Did you set that as the _APP_DOMAIN_FUNCTIONS?
Recommended threads
- API preflight request not working on .f...
When I am calling a function on my APP through the domain is failing. Because the preflight request (OPTIONS HTTP request) times out. this only occurs with fu...
- No Headers
Hi I have 2 appwrite functions, one is working fine on localhost, second is not even working on prod with https, i inspected the api call, no headers are being ...
- Cloud Function Deployment crashing
My golang cloud function crashes on deployment and its a bit non-descript. Here is the error message. It says "Document already exists". This is a general probl...
