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

  • SEARCH
  • Home
  • 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 8468907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:04:36+00:00 2026-06-10T16:04:36+00:00

I just installed node.js on Windows. I have this simple code which does not

  • 0

I just installed node.js on Windows. I have this simple code which does not run:

I get:
Error: listen EADDRINUSE

Is there a config file that tells node.js to listen on a specific port?

The problem is I have Apache listening on port 80 already.

EDIT:

var http = require('http'); 
var url = require('url'); 

http.createServer(function (req, res) { 
 console.log("Request: " + req.method + " to " + req.url); 
 res.writeHead(200, "OK"); 
 res.write("<h1>Hello</h1>Node.js is working"); 
 res.end(); 
}).listen(5454); 
console.log("Ready on port 5454");
  • 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-10T16:04:38+00:00Added an answer on June 10, 2026 at 4:04 pm

    There is no config file unless you create one yourself. However, the port is a parameter of the listen() function. For example, to listen on port 8124:

    var http = require('http');
    http.createServer(function (req, res) {
      res.writeHead(200, {'Content-Type': 'text/plain'});
      res.end('Hello World\n');
    }).listen(8124, "127.0.0.1");
    console.log('Server running at http://127.0.0.1:8124/');
    

    If you’re having problems finding a port that’s open, you can go to the command line and type:

    netstat -ano
    

    To see a list of all ports in use per adapter.

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

Sidebar

Related Questions

I just installed node.js for windows and it really was a breeze to get
I already have Node.js v0.8.0 running on Windows. Can I just run the latest
I have just installed MongoDB in my machine (Windows 7) and installed node-mongodb-native using
I just installed my node.js app in a windows micro instance with security group
just installed new ubuntu vm to test around with node installed things in this
I'm running node.js on OSX and have just installed mongodb using command npm install
I just installed Ubuntu 10.10 server with NodeJS 0.4.6 using this guide: http://www.codediesel.com/linux/installing-node-js-on-ubuntu-10-04/ on
I've just started with node.js and socket.io. I installed node.js using the windows installer,
This is really weird problem. I just installed Node.JS on my system (Fedora). I
I got this error when I started the r-node server: ./run-server.sh node.js:134 throw e;

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.