-1

I am beginner in node.js programming. I did the simple program. I am running this program in localhost 8086.I am using Webstorm to execute this.This program works perfectly last two weeks. Suddenly it shows the error. I cannot able to run this program in localhost. It shows the error event in (port listen 8086). Can anyone solve this issue? Thanks in advance..

Error

var express=require("express");
var app=express();
app.get("/abc",function(request,response)
{
    response.send("I got a request");
    console.log("I got a request");
});
app.listen(8086,function()
{
    console.log("server running at port 8086");
});
  • Possible duplicate of [Node / Express: EADDRINUSE, Address already in use - Kill server](https://stackoverflow.com/questions/4075287/node-express-eaddrinuse-address-already-in-use-kill-server) – vapurrmaid Apr 06 '18 at 19:57
  • Did you try rebooting first? – Kevin B Apr 06 '18 at 21:45

2 Answers2

0

EARDRINUSE means that the port is already in use.

You had run another server use the same port like 8086 (in your case).

Maye you had run node app in other terminal in WebStorm. Please close it and run it again.

You can check PORT no. is available or not using by netstat -tulnp | grep <port no>

0

Another application is already using that port. Check if you installed / started another software that might use the port 8086.

FabianTe
  • 438
  • 2
  • 12