Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8759209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:44:38+00:00 2026-06-13T14:44:38+00:00

I want to use Node.js run as a back-end server to serve front-end socket.io

  • 0

I want to use Node.js run as a back-end server to serve front-end socket.io request.

The samples I found, seems can only run pages from Node.js server.

<script src="/socket.io/socket.io.js"></script>

The above js include is served by Node.js, how to include it if the front-end is a different application (e.g. PHP or static pages) ? Do I need to include all the dependent socket.io js libraries to make it work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T14:44:39+00:00Added an answer on June 13, 2026 at 2:44 pm

    I’m currrently running apache/php alongside node.js/socket.io
    If this is what you’re trying to do, you can do it by serving socket.io on a different port than what apache is serving on (assumed 80).

    In node.js, initialize the socket.io listener on a port 8080 for example:

    var io = require('socket.io').listen(8080);
    

    I believe, by default, socket.io will also serve its static client side files conveniently for you, such that in you html, you can:

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

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a standard node.js static file server that I want to use to
I want use JQuery mobile for the front-end of my mobile application, but I
I have a node.js script on my server that I want to run continuously
I want use BYTE_ORDER macro in my Xcode project but i can't because i
I want to use ._get_type ( node ) function from jsTree plugin types The
I want to use the built-in web server for VS 2008 and have it
I am having trouble getting my node.js server to do an http POST request
I use the node.js and socket.io. My application runs on the port 3000. The
I'm trying to compile LESS from PHP and don't want to use node.js or
I have a node server and I want to add an external .js file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.