Closed SebLz closed 6 years ago
This library is intended for use from Node.js, and the net module is part of that. If you're using it client-side, you'll need to find a module that can provide that functionality for you. You probably need components on both the client and the server to get this working, as web browsers generally don't support raw TCP connections. This library is intended for server-side applications that need the performance benefits of the binary protocol.
Given your scenario, you'd be better off using the Event Store HTTP API directly from the client.
Ok, thanks for your explanations. I also considered the http API but I don't really like the polling system. I think I will probably use SignalR then.
Hello,
I've tried to use this library to connect angular 5 clients to an eventstore backend, unfortunately I'm running into multiple problems. I've installed the application using
npm install event-store-client
and insertedimport * as EventStoreClient from "event-store-client";
at the top of test-es.ts - the TS file responsible for connecting to the EventStore server (based on the provided example.js file). After building the app withng serve
, I first had a first runtime error when loading the page that calls to test-es.ts:get http://localhost:4200/ClientMessageDtos.proto error 404 (not found)
I solved this by manually deploying the proto file in.angular-cli.json
Then I run into another runtime error:Therefore I was wondering if anyone had successfully managed to use this library in an Angular+typescript client-side application.
And btw, thanks for this very interesting library !