2
I did the global installation of express on Ubuntu (and on my Mac too) using
npm install -g express
Then I created my app using the command:
express -se hello_express
I entered the application directory and typed:
npm install
When I try to run Node using the command
node app.js
he accuses the following error:
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:901:11)
at Server._listen2 (net.js:1039:14)
at listen (net.js:1061:10)
at Server.listen (net.js:1135:5)
at Object.<anonymous> (/caminho_da_aplicacao/hello_express/app.js:36:24)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
I’m starting now with "Node + express," so I’d like to know if anyone’s been through this, if I’m doing something wrong, and how do I solve it.
You forgot to put precisely the code of your app, which is the most important
– Emerson Rocha
The code is the default, created automatically by express in app.js
– Leandro Cissoto