appwrite / sdk-for-cli

[READ-ONLY] Official Appwrite CLI >_
BSD 3-Clause "New" or "Revised" License
85 stars 28 forks source link

Failed to connect to localhost: Connection refused with status code 0 #9

Closed andydean565 closed 3 years ago

andydean565 commented 3 years ago

I have set up appwrite write using docker-compose on my localhost, but the CLI won't connect to the server

christyjacob4 commented 3 years ago

Hey @andydean565 Can you make the following request in postman and share the output ?

Method : GET Url : [Your endpoint]/v1/locale/continents

Headers: x-appwrite-project : Your project ID

andydean565 commented 3 years ago
{
    "sum": 7,
    "continents": [
        {
            "name": "Africa",
            "code": "AF"
        },
        {
            "name": "Antarctica",
            "code": "AN"
        },
        {
            "name": "Asia",
            "code": "AS"
        },
        {
            "name": "Europe",
            "code": "EU"
        },
        {
            "name": "North America",
            "code": "NA"
        },
        {
            "name": "Oceania",
            "code": "OC"
        },
        {
            "name": "South America",
            "code": "SA"
        }
    ]
}
christyjacob4 commented 3 years ago

If this works, then you should be able to use the same endpoint( including /v1) and project ID in appwrite init and it should work @andydean565

andydean565 commented 3 years ago

have managed to get it working and am unsure if the issue was down to when I setup the appwrite host from localhost to 0.0.0.0

or

i was originally working through powerShell with wsl but have since changed to setting everything up in wsl ubuntu (including the CLI)