Connection Refused when testing nodjs example

I am trying to run the the examples to evaluate. I am using the Docker image and have that up and running. It is returning an ‘ok’ from curl -k https://localhost:9980. When I run the nodejs example and try to connect to this Collabora server running in docker with my local ip address as the nodejs server and the Collabora server are running on the same lan. I get
Error: connect ECONNREFUSED 192.168.50.159:9980
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1634:16)
Emitted ‘error’ event on ClientRequest instance at:
at emitErrorEvent (node:_http_client:104:11)
at Socket.socketErrorListener (node:_http_client:518:5)
at Socket.emit (node:events:518:28)
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
errno: -4078,
code: ‘ECONNREFUSED’,
syscall: ‘connect’,
address: ‘192.168.50.159’,
port: 9980
}

Hi @jpappy welcome to the community :slight_smile:

A few things to check:

  • Looks like Collabora might only be listening on localhost. Try binding it to 0.0.0.0 inside the container so it’s accessible on your LAN.
  • Check your Docker networking settings to make sure the port is exposed properly.

Also, take a look at our SDK examples—there’s a Node.js integration that might help.

If you’re up for it, contributing to the SDK examples would be awesome! It’d be a great way to help others looking for similar integrations. Let me know how it goes!

Thanks
darshan