Questions tagged as 'socket.io'

1
answer

Socket.io Visitor Counter

Well, this is the following I have the following code in my app.js from my project, which I took on the internet to study: // Servidor: app.js // Iniciando servidor HTTP var app = require('http').createServer(index) , io = require('socke...
asked by 22.03.2017 / 03:52
1
answer

Start nodejs on Azure

I have a problem to start the nodejs on the azure server, I already configured everything right and the site is already in the air, however I have a chat on node, using socket.io, see the code below (index.js): var express = require('expr...
asked by 24.10.2016 / 14:39
1
answer

making variable error message? [closed]

I have a servitor and he is giving a simple error but I do not know how to solve it being that the objects are apparently normal see the code below. var io = require('socket.io').listen(8000); var players = {}, count = 0; io.sockets.on(...
asked by 27.05.2015 / 19:24
1
answer

Error sharing HTTP session with socket.io. io.sets "is not valid".

I'm applying step by step the book "Node.js, real-time applications" by Caio Ribeiro Pereira. All right up to the share of express-session from HTTP to socket.io. As far as I can see there is nothing wrong, but when I try to connect the serve...
asked by 21.01.2015 / 02:55
0
answers

Doubt Socket.io Push Notification

Hello, I have an application made with node.js and socket.io which sends a push notification when the client.html page is open. my question is: How to send and receive notification even though the client.html page is closed. When the client.h...
asked by 01.06.2018 / 13:24
1
answer

Function loading problem Node socket.io

I have the following code: module.exports = function(app) { app.get('/', function(req, res) { res.render('chat/index'); var io = app.get('io'); io.on("connection", function(socket) { console.log("Usuar...
asked by 28.12.2017 / 19:46
1
answer

Why NodeJS has 4.x, 5.x, 6.x and 0.1x.x versions, etc.

Why Node.js exists in versions 4, 5, and 6, but also exists in 0.x.x versions. Or maybe, what are the differences between x.x and 0.x.x ?     
asked by 10.05.2016 / 03:07
1
answer

Error socket.io Node.js

The intention with the program is that when two clients connect they display in the window of one client the id of the other. The program saves the two ids in the variables but sends only to the first user who logged in. The second logged-on use...
asked by 23.06.2017 / 05:35
1
answer

Why NodeJS has 4.x, 5.x, 6.x and 0.1x.x versions, etc.

Why Node.js exists in versions 4, 5, and 6, but also exists in 0.x.x versions. Or maybe, what are the differences between x.x and 0.x.x ?     
asked by 10.05.2016 / 03:07
0
answers

Socket.io connects but does not send the emit to the server and vice versa. Nginx and SSL

I'm using Nginx with SSL and this setting for a service to communicate with the node, when I access the address socket.io usually connects to the server but does not receive the emit or send. location ~ ^/(atualizaUltimaPosicao|node|socket\.io...
asked by 14.11.2016 / 12:57