Saturday, 10 June 2017

"Port 4200 is already in use. Use '--port' to specify a different port."

Hey i am runnning an angular2 app with express as backend. Getting the following issue:

[3] Port 4200 is already in use. Use '--port' to specify a different port. [3] [nodemon] app crashed - waiting for file changes before starting... [1] [HPM] Error occurred while trying to proxy request /api/jobs from localhost:4200 to http://localhost:3000 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)

server.js:

dotenv.load({path: '.env'}); app.set('port', (process.env.PORT || 3000));

when i inspect the port:

port inspection

I using concurrently: with this options

"dev": "concurrently \"mongod\" \"ng serve -pc proxy.conf.json --open\" \"tsc -w -p server\" \"nodemon dist/server/server.js\"",



via Dani R

No comments:

Post a Comment