I've started node js and are simply building a node server. I put the same code as the picture below in index.js and executed node index.js. The following error occurred in the terminal below. Can you tell me how to solve it?
CodePudding user response:
You probably already have a node application open at port 8080.
Try changing your port.
You can check if the PORT number is available by using the command:
netstat -tulnp | grep <port no>
or you can use lsof:
lsof -i :<port no>
CodePudding user response:
You are using restricted port image source
try using port 3000