Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

85
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.