Closed mandersen closed 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?
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.
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.
Not everyone would serve their client from their backend web server, for example , when you deploy your client to a CDN.
Yes, but if you set the io.sails.url variable to your CDN url, it should just work, am I right?
I suppose so. :)
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