Reputation: 182
Sails.js has builded socket.io support.
I'm building 2-tier application so my client works at different port than backend API (Sails).
How can I use builded socket in this scenario? How can I define connection options between my client and API for socket? Right now I just attach script tag. My client works at port 8040 and API at 1337.
<script src="http://localhost:1337/js/dependencies/sails.io.js"></script>
I'm getting error:
Upvotes: 2
Views: 111
Reputation: 2051
By this documentation, you can use io.sails.url = 'https://api.mysite.com';
Upvotes: 2