I've followed some tutorials and web casts on code school, mainly those on Node, ES2015, Angular, and Express. I've started a little project of my own and I've implemented all of the above. I'm also trying to get automated builds and testing working using Travis-CI and Mocha/Supertests for test driven development. The problem though is if I run npm test
I get this error from Mocha
1) Uncaught error outside test suite:
Uncaught Error: listen EADDRINUSE :::3000
at Object.exports._errnoException (util.js:870:11)
at exports._exceptionWithHostPort (util.js:893:20)
at Server._listen2 (net.js:1236:14)
at listen (net.js:1272:10)
at Server.listen (net.js:1368:5)
at EventEmitter.listen (node_modules/express/lib/application.js:617:24)
at Object.<anonymous> (server/app.js:34:5)
at require (internal/module.js:12:17)
at Object.<anonymous> (test.js:6:11)
at require (internal/module.js:12:17)
at Array.forEach (native)
at node.js:962:3
I just noticed that I was missing module.exports = app
at the end of my main app.js
that might have helped but the tests still fail.
Here is a link to the latest push on GitHub.
Here is the failing build on Travis-CI.