diegopamio / angular-sails-bind

An angular service to bind scope models to sailsjs models thru socket
MIT License
136 stars 25 forks source link

socket.io installation and configuration to readme #2

Closed mandersen closed 10 years ago

mandersen commented 10 years ago

Diego thank you very much for sharing this.

Would you mind adding to the readme a snippet showing how to specify the URL for the sailsjs resource?

Thank you

diegopamio commented 10 years ago

Actually, you don't need to specify the url, it assumes is in the same base url as the angular page being served (e.g.: http://localhost:1337/) and then you only need to provide the resource name (e.g.: "classroom").

Do you need to be able to specify a different url for the resource?

mandersen commented 10 years ago

That makes sense, thank you for your reply. I had set up separate Sails 0.10 (localhost:1337) and Angular (localhost:9000) instances for development; I was expecting a way to point the Angular instance at 1337. It sounds like the correct approach is to serve Angular via Sails. Can you recommend a Sails 0.10 + Angular seed project that works with angular-sails-bind? The official angularSails repo looks like it is not ready. Best regards.

diegopamio commented 10 years ago

Have you tried to set "io.sails.url" to something different? as this bind plugin is made on top of sails.io.js, perhaps it could just work.

niallobrien commented 10 years ago

Not everyone would serve their client from their backend web server, for example , when you deploy your client to a CDN.

diegopamio commented 10 years ago

Yes, but if you set the io.sails.url variable to your CDN url, it should just work, am I right?

niallobrien commented 10 years ago

I suppose so. :)