Error while creating a server. #5034
-
I have written a simple code to create server on Nodejs. The code is as follows const http = require('http'); const server = http.createServer((req, res) => { server.listen(5000); For this, I am getting an error saying: Can Anyone please help with this |
Beta Was this translation helpful? Give feedback.
Answered by
AfrazAslam
Jan 24, 2023
Replies: 0 comments 1 reply
-
There is another program using port 5000. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
avivkeller
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is another program using port 5000.
Using the lsof command you can find the process ID (PID) for a specific port that is in a LISTEN state.