Typesense service not reachable
I am using the typesense template (https://railway.app/template/DXBDVS), but I'm struggling to connect to the service. E.g. I only get timeouts for
https://RAILWAY_PUBLIC_URL/health
.
Looking at the logs, the app seems to start ok, and Railway itself seems to be able to call the /health
endpoint when it does deployments?
Not really sure what the issue might be, whether it's my fault, Railway's, or typesense's.
Project id: 68d08275-c56e-4204-ab46-04737e0cf4dc14 Replies
Project ID:
68d08275-c56e-4204-ab46-04737e0cf4dc
looking into it
im not seeng any issues? tell me more about how youre calling the url?
Thanks @Brody , the company VPN was at fault it seems and blocked the curl requests. The manual request work fine now, though the client from their npm package still times out. But that's not a Railway question I guess.
well curl or node isnt gonna matter, if its blocked it will be blocked in both
For sure. But turning the VPN off solved the manual timeouts, but not the node ones. So something else is going on as well.
are you using some npm package?
npm
typesense
Javascript Library for Typesense. Latest version: 1.7.2, last published: 2 months ago. Start using typesense in your project by running
npm i typesense
. There are 53 other projects in the npm registry using typesense.I think I found the issue.
show me your
Typesense.Client()
?
youd need to set port to 443I was initializing the client with a node using "host" and "port". But I saw in the types for the client, that there is a "url" option.
Just using that and using the Railway public URL works.
host and port work fine, you just need to specify the correct host, port, and protocol
Ah, you are right. I was confusing the internal port for typesense with the https one. Fixing that and everything works. Thanks a bunch!
no problem!