Is socket.io web site SEO friendly?

I know google bot load javascript and execute it. for example react app can be SEO friendly if I use react router and …

But does google bot execute websocket (socket.io) and get result and crawl that?

For example if have /products route and after socket connect an event with name product_list come and I put them in the table.

Are node.js, express, socket.io, localhost on http, and alike ACTUALLY secure? [closed]

I use localhost for learning more coding, and I keep wondering the same question over and over again when I use Node.js:

Is it really safe?

Many, many people might have asked this. I would naturally want to put SSL HTTPS encryption on it, but there isn’t really anywhere you can get it, even if it may be a bit overkill.

It feels like there should and could be some "protection" or "encryption" type package for npm or something.

I haven’t used Node.js or localhost it for sensitive information, but should I be worrying about this?

real time data with socket.io

I’m building a bidding web-app and considering the use of websockets to provide latest bid price. I’ve looked at websocket.io and was wondering if this works with Laravel framework and if anyone has it working because I have seen this mainly implemented in Node JS.

Additionally, if I have a single server, serving regular web pages (80/443) can Websockets utilise the same ports?

Thanks

Chat entre dos personas con NodeJS y Socket.io

soy algo nuevo con socket.io y quiero hacer un un tipo de ayuda o asistencia en mi plataforma entre un usuario y el administrador a través de un chat, esto para resolver dudas o cualquier otro tipo de inconveniente.

El problema es que no logro hacer la comunicación entre los dos. Acá parte del código.

Cliente o Usuario

enviar.addEventListener('click', function() {     //Enviando Datos al Servidor     socket.emit('asistenciaCliente', {         usuario: usuario.value,         mensaje: mensaje.value     });      mensaje.value = ""; //Borrando campo al mandar el mensaje     mensajeChange();     mensaje.focus(); });   socket.on('asistenciaServidor', function(datos) {     // console.log(datos);     salida.innerHTML +=         `<p>         <strong>$  {datos.usuario}:</strong> $  {datos.mensaje}     </p>`;     salida.scrollIntoView(false); //Mostrar Ultimos Mensajes en Pantalla de forma automatica }); 

Administrador

socket.on('asistenciaServidor', function(datos) {     // console.log(datos);     salida.innerHTML +=         `<p>         <strong>$  {datos.usuario}:</strong> $  {datos.mensaje}     </p>`;     salida.scrollIntoView(false); //Mostrar Ultimos Mensajes en Pantalla de forma automatica }); 

Servidor

socket.on('asistenciaCliente', (datos) => {   console.log(datos);    socket.join(datos.usuario);   io.sockets.to(datos.usuario).emit('asistenciaServidor', datos); }); 

cabe mencionar que ya hace los chats privados para cada usuario, pero no muestra los mensajes al Administrador 🙁

Espero me puedan ayudar.

Socket.io ERR_CONNECTION_REFUSED

Estoy haciendo un chat en mi web en php de forma local con Socket.io. El chat ya es funcional, pero solo en mi computadora. Me estoy conectando desde mi celular y una laptop de forma remota y al entrar al chat me aparece el siguiente error

GET http://localhost:3000/socket.io/?EIO=3&transport=polling&t=Mq0JkAs net::ERR_CONNECTION_REFUSED

Como les mencioné antes, ese error solo me aparece en cualquier otro dispositivo que intenta acceder a mi computadora. Ya tengo desactivado el Firewall. No sé si tenga que ver con Apache, el choque de los puertos, o algo así :(.

Les pongo un poco del codigo. Archivo php

    <div id="chat-container">         <div id="chat-window">             <div id="salida"></div>             <div id="acciones"></div>         </div>         <input type="text" id="usuario" placeholder="Usuario">         <input type="text" id="mensaje" placeholder="Mensaje">         <button id="enviar">Enviar</button>     </div>      <script src="node_modules/socket.io-client/dist/socket.io.js"></script>  </body> <script src="JavaScripts/jquery-3.4.1.min.js"></script> <script src="js/bootstrap.min.js"></script>  </html>  <script> const socket = io('http://localhost:3000'); </script> 

Archivo js (Servidor)

const express = require('express');//Servidor Express const app = express(); const path = require('path');  // Settings app.set('port', process.env.PORT || 3000);//Usar el puerto  //Iniciando el Servidor const server = app.listen(app.get('port'), () => {//leer puerto utilizado     console.log('Puerto: ',app.get('port')); });   //Conexion a Socket.io const SocketIO = require('socket.io');/*Modulo Socket.io */ const io = SocketIO(server);// Conexion de los webSockets  //WebSockets io.on('connection', (socket) =>{     console.log('Nueva Conexion', socket.id);  });  io.on('error', (error) => {     console.log(error);   }); 

Espero me puedan ayudar. 🙂

How to distribute socket.io servers globally?

Socket.io service that needs constant communication with Mongodb. We currently have a load balancer server, 16 containers in a server (due to nodejs being single threaded, we split processes by dockers so we can utilize entire server) and a MongoDB server. We aren’t on production yet so we didn’t create a replication system. But we have a problem; Our servers are located in Europe. When i measure the latency between South America (We have lots of clients over there) and Europe, it measures around 200 ms. That might be a problem for us. If we create a socket server in South America, then our socket server and database server will have latency issues. Any idea on how to distribute them globally?

Phaser 3 multiplayer with Socket.io – restart/reconnection problem

Anyone have an experience to make multipayer game with Phaser 3 and Socket.io ?

I have a problem with socket.io and phaser, especially if player reconnect again or restart the game scenes.

Player -> Die -> Gameover -> Reconnect/restart -> (Error)

I have 2 scenes, first one for “main game” and second one for “game GUI” to show player stats and game popup.

All variable (including socket) and game functions are stored inside create(), so there are no global functions and variable.

then if the game or scenes are restarted, it’s take a delay about 3 seconds (freeze), then the game error are appear.

all error are happen inside socket.on(‘emit’)

How to fix this?

var socket = io.connect();

UnhandledPromiseRejectionWarning socket.io e hapi joi

Boa noite!

Alguém sabe como arrumar esse error?

(node:6168) UnhandledPromiseRejectionWarning: Error [ERR_UNHANDLED_ERROR]: Unhandled error. ("password" length must be at least 6 characters long)     at Socket.emit (events.js:171:17)     at Socket.emit (C:\Users\Mate\Documents\cafeLite\node_modules\socket.io\lib\socket.js:142:10)     at Socket.socket.on (C:\Users\Mate\Documents\cafeLite\index.js:44:20)     at Socket.emit (events.js:182:13)     at C:\Users\Mate\Documents\cafeLite\node_modules\socket.io\lib\socket.js:528:12     at process._tickCallback (internal/process/next_tick.js:61:11) (node:6168) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:6168) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 

Tentei tudo que eu sei mas não estou conseguindo.. este é o meu código:

const Joi = require('@hapi/joi');  const schema = {     username: Joi.string().min(3).max(20).required(),     password: Joi.string().min(6).max(1024).required(), }  io.on('connection', function (socket) {          socket.on("register", async (data) => {         const {error} = Joi.validate({username: data.user, password: data.password}, schema)          if (error) {             socket.emit("error", error.details[0].message)         }       })     console.log('\x1b[33m', "[SERVER] New connection") });  

Socket.IO aumento de latencia despues de unos mensajes

estoy haciendo una app con socket.IO y react (no va al caso) de mensajeria, al comienzo esta funciona perfecto y la información va y viene correctamente, pero al mandar 10 mensajes seguidos, mas o menos, el socket del cliente empieza a tardar muchisimo en recibir, el servidor lo envia en tiempo y el wifi tambien, que puede ser? hay alguna configuracion especial?

aca dejo un screenshot del network de la consola donde se ve como colapsa y empieza a tardar minutos en recibir un mensaje tan corto, ademas por culpa de esto la pagina entera queda lageada

MongoDb: not authorized on admin to execute command { create: “socket.io” }

Deploying NodeBB with MongoDb cluster on Atlas Mongodb.

I can successfully complete the .\nodebb setup command. It also works as expected against local instance of Mongodb but when I run it against Atlas cluster I get:

not authorized on admin to execute command { create: "socket.io", capped: true, size: 5242880 }"

My config.json

{     "url": "http://localhost:4567",     "secret": "dc0b3fff-4312-1234-4321-e5a327824225",     "database": "mongo",     "port": "4567",     "mongo": {         "host": "cluster0-shard-00-00-z1243.mongodb.net,cluster0-shard-00-01-z1234.mongodb.net,cluster0-shard-00-02-z1234.mongodb.net",         "port": "27017,27017,27017",         "username": "dbUser",         "password": "1234123412341234",         "database": "somedbname",         "uri": "mongodb+srv://dbUser:1234123412341234@cluster0-z1234.mongodb.net/somedbname?retryWrites=true"     } } 

Have experimented with the direct changes to the mongodb connection parameters in the mongo.js file

ssl: true, authSource: 'admin', replicaSet: 'Cluster0-shard-0', 

Have also passed these there parameters as http query params on the connection uri.