Questions tagged [sails.io.js]

JavaScript SDK for communicating w/ Sails via sockets from Node.js or the browser.

JavaScript SDK for communicating w/ Sails via sockets from Node.js or the browser.

92 questions
9
votes
1 answer

Emit an event with node.js socket client to sails.js (0.11.x)

The server: sails.js (0.11.x) is the server The client: A node.js script with sails.io@0.11.5 and socket.io-client@1.3.5 Big picture: I have, or will have, a farm of node.js scripts that connect to the sails.js server and will perform various…
nodnarB
  • 159
  • 6
8
votes
2 answers

Keeping a client-side sync of Sails.js collection, using sockets

I very much like Meteor's pub/sub. I wonder if there is a way to get a similar workflow, using sails.js or just a socket library in general. In particular, what I would like to be able to do is something along the lines of: //…
demux
  • 4,544
  • 2
  • 32
  • 56
5
votes
0 answers

sails.js socket.io through nginx shows lots of 'upstream timed out'

I'm running a couple of sails.js backend instances behind an nginx proxy with sticky sessions. I keep seeing a lot of messages in my nginx error.log regarding sails.js /socket.io/ URLs timing out: 2016/01/04 20:55:15 [error] 12106#12106: *402088…
serjrd
  • 81
  • 5
5
votes
1 answer

cross domain configuration issues using nginx, sails and upstart

I'm having cross domain configuration issues using nginx and sails. The problem is that if I get the socket to connect properly via http://domain-server.com/socket.io/ then the RESTful request will fail. If RESTful works the socket will…
GillesC
  • 10,647
  • 3
  • 40
  • 55
4
votes
1 answer

How to use vue.js with sails js

I want to use vue.js as frontend for sails.js i tried to configure using the method given at http://filipbartus.name/integrate-vue-loader-with-sails-js/ but it was not working for vue latest version but i don't see any reason why? can someone…
identicon
  • 61
  • 1
  • 6
4
votes
1 answer

connecting desktop and mobile clients to Django and Sails MVC webframeworks

I want to build an MVC web application using sails.js. I also want to have a mobile app and desktop client to connect to my web app. For connecting the mobile client I want to use socket.io since it gives realtime capabilities to it. How should I…
pjsofts
  • 170
  • 4
  • 18
4
votes
1 answer

Sails.js socket.io general security

Using sails sockets. From a browser I can get all 'tasks' where the user id is 1. I can now listen for the 'task' event and look for 'created' in the verb to get new tasks and add them to the list. However I get events from ALL created tasks…
MickCrozier
  • 312
  • 1
  • 8
4
votes
1 answer

Not able to add scripts in layout.ejs (sails.js)

I am trying to add a route.js file in the layout.ejs. Scratchpad
divakar
  • 1,379
  • 6
  • 15
  • 31
4
votes
2 answers

API request from front-end using sails.io.js

I have a basic front-end (html, css, jquery) and I'd like to use sails.io.js to communicate with an API server (developped with sails, with cors enabled). The API is running on localhost:10000 but it will be on an another domain than the one of the…
Luc
  • 16,604
  • 34
  • 121
  • 183
3
votes
0 answers

sailsjs sockets and nginx proxy

i have a nodejs sails app proxied by nginx.Everything works fine but cant seem to connect to sails.io websocket.I get the error below in browser Refused to connect to…
Steve
  • 31
  • 1
3
votes
1 answer

https not working in localhost in sailsjs

I am trying to setup ssl in my local system. I am using windows machine with sails js application. here is the configuration that I did. /** * Production environment settings * (sails.config.*) * * What you see below is a quick outline of the…
baj9032
  • 2,414
  • 3
  • 22
  • 40
3
votes
0 answers

WebSocket issues with Sails.js on Heroku

I've recently been working on a project in Sails.js that makes use of websocket functionality. It is deployed on Heroku and it's been having issues with incoming connections being able to connect via websockets. I've tried forcing websockets…
Ian Kidd
  • 66
  • 3
3
votes
2 answers

Sails 0.10 ModelIdentity.subscribe or .watch and for publishCreate()?

I'm studying the SailsCasts and I'm working on SailsJS beta version 0.10. Everything works except when in 0.9.7, I use this: //subscribe this socket to the User model classroom User.subscribe(req.socket); // subscribe this socket to the user…
ginolin
  • 345
  • 2
  • 6
  • 18
2
votes
1 answer

Sails error when sending response back

Ok so sockets connects and everything. I can debugg the controller but when it gets to line return res.ok() it breaks. I also had a res.json({message: "hello"}). but i get the same error. /*** SocketController * * @description :: Server-side…
user933306
  • 51
  • 5
2
votes
0 answers

SailsJS get own socket ID on client

How can I get the socket ID on the client side in a clean way? I already use io.socket._raw.id to access the socket ID, but this is more a hack I think. I can't find a function like io.socket.getId() or something similar to get the socket ID.
Martin Cup
  • 2,399
  • 1
  • 21
  • 32
1
2 3 4 5 6 7