Issues connecting to local insecure EventStore

Hi, I am trying to follow the basic demo/example for working eventstore. I tried in both Docker and Windows installation but I cant seem to get the NodeJS client to append to stream or readstream. My guess is that it’s a connection / security mismatch but I have no idea why.

I followed the getting started guide and used this command in Windows:
EventStore.ClusterNode.exe --db ./db --log ./logs --insecure true

In docker I did this (on a different computer)

docker run --name esdb-node -it -p 2113:2113 -p 1113:1113 \
    eventstore/eventstore:latest --insecure --run-projections=All

But when i tried running the example with the code below, I get ‘14 UNAVAILABLE: No connection established’ error.

    const client = new EventStoreDBClient({
        endpoint: "localhost:2113",
    }, {
        insecure: true,
    });
  ...
    const appendResult = await client.appendToStream(streamName, [event]);

Did i miss anything? I added the ‘insecure’ to the client thinking that was surely the missing piece but it didnt help

thanks!

Update for any future people, I found the NestJS tutorial here: Building A NestJS Web Application With EventStoreDB and started up the DB with the docker-compose file in there and it works now with my existing code.

@shachar.lahav, are you sure that ESDB was running successfully? I just tried docker from docs:

docker run --name esdb-node -it -p 2113:2113 -p 1113:1113 \
    eventstore/eventstore:latest --insecure --run-projections=All

with such code:

import {EventStoreDBClient, jsonEvent} from '@eventstore/db-client'

const client = new EventStoreDBClient({
    endpoint: "localhost:2113",
}, {
    insecure: true,
});

const appendResult = await client.appendToStream("test", [ jsonEvent({
    type: "grpc-client",
    data: {
      languages: ["typescript", "javascript"],
      runtime: "NodeJS",
    },
  }) ]);

console.log(JSON.stringify(appendResult.success))

And it successfully appended the event.