This message was deleted.
# community-help
s
This message was deleted.
k
Check that Typesense server is actually running on the host and port configured. For e.g. what happens when you type
http://localhost:8108/health
in the browser?
a
http://localhost:8108/health i open this on browser got *{*"ok": true }
k
Try increasing
connectionTimeoutSeconds: 2,
and if that does not help, check Typesense logs to see whether any error is logged
a
try to increase connectionTimeout doenst help, and i was checking typesense logs(undex /opt/homebrew/var/log/typesense/) thers is no errorr. but when i try to use curl it surprisingly no error
Copy code
curl "${TYPESENSE_HOST}/collections" \
   -X POST \
   -H "Content-Type: application/json" \
   -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" -d '{
    "name": "books",
    "fields": [
     {"name": "title", "type": "string" },
     {"name": "authors", "type": "string[]", "facet": true },

     {"name": "publication_year", "type": "int32", "facet": true },
     {"name": "ratings_count", "type": "int32" },
     {"name": "average_rating", "type": "float" }    
    ],
    "default_sorting_field": "ratings_count"
   }'
k
Are you saying curl works but not in node?
a
yupp
k
Copy code
Request to Node 0 failed due to "ECONNREFUSED connect ECONNREFUSED ::1:8108"
The
::1:
part looks weird to me. It's trying to connect via IPV6 address?
y
yes, happens often with recent versions of Node on Mac, try changing
localhost
to
127.0.0.1
k
Ah that's interesting! Typesense doesn't support IP V6 yet.
a
Ahhh it workss, thanks for helping me guys🙏