Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

87
Vistas
How to set up socket.io on the client while using nginx as a reverse-proxy?

I'm going to try to ask this as simply as I can:

<script src="http://127.0.0.1:8080/socket.io/socket.io.js"></script>

is to local host as

<script src="http://????????/socket.io/socket.io.js"></script>

is to nginx?

Worked on local host as well as production while the ip address and port were hard coded (before I added a domain name and nginx on digital ocean). I am only using nginx as a reverse-proxy for an apache server. This is the node server.js file ran at start up.

var PORT = 8080;
var mongo = require('mongodb').MongoClient,
    ioClient = require('socket.io').listen(PORT)
;
9 months ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos