Skip to content

README.md example not working out of the box #49

@gbougeniere

Description

@gbougeniere

Hi,

First of all, I want to thank you for your work on Eventric. I've used Eventric to bootstrap a showcase on Event Sourcing. The Socket.IO endpoint especially came in handy.

When I started to play with Eventric, I first tried the example provided in README.md as is, but I've not been able to make it work. I had to dig into the source code to come up with a solution. I'm not making a pull request yet because I'm not sure my corrections are the good ones.

Here are the changes I've made.

First of all, when I tried to configure the Socket.IO remote endpoint on the server, the following code didn't work :

socketIORemoteEndpoint.initialize socketIORemoteEndpointOptions, ->
    eventric.addRemoteEndpoint socketIORemoteEndpoint

It looks like we can't have a callback in the initialize function

I changed it to :

socketIORemoteEndpoint.initialize socketIORemoteEndpointOptions
eventric.addRemoteEndpoint socketIORemoteEndpoint

Then, client side, when I tried to remote connect to the todo context, the folowing line didn't work :

var todoContext = eventric.remote('Todo');

It looks like the eventric.remote function does not exist. I used the eventric.remoteContext function instead :

var todoContext = eventric.remoteContext('Todo');

If this is correct, I can make a pull request if you wish.

Gilles

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions