ryancp / sailng

Sails.js + Angular = Awesome

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using this frontend with a blueprint api.

thewaterbear opened this issue · comments

As a test, I took this repo and removed all your controllers and routes code on the backend and changed the blueprint prefix to "/api".

I also added autoWatch: true in the config/blueprint.

In theory I think that should work, and it is halfway working...

Now when I write a message, it comes up in the second window (realtime), but doesn't show in the original window from where it was typed..

I get this error on the server
error: Invalid usage of userpublishAdd(id, alias, idAdded, [socketToOmit])
I found its coming from pubsub line 912.

This is kind of a specific sails problem. Maybe a bug? If someone confirms I will post it on the beta repo

Turns out I think this is intended behavior.

Socket actions don't need to fire on the browser that created them because that should be handled in the callback or promise.

Not sure about the error message, but this project does work with the blueprint api :)