
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
- Functions in Golang - I need help
Hi guys! I am struggling to deploy a rather simple golang function. The deployment log details are very sparse: "failed error code: 524 " or: "Cannot access ...
- Issue creating team membership with USER...
Log time ago it worked without any issue when I made a demo app but now it is not working in cloud function. code ```await awTeams ?.createMembe...
- Deployment Error Logs - Golang Functions
Hi guys - I have been developing an appwrite function via the cloud service with a golang runtime environment. Currently, I only get error messages whilst deplo...
