Nodejs : Error get/response localhost

I'm running a Cakephp app with MAMP on localhost at port 80. I've also Node.js who listen/write on port 4000 with a js script from the Cake app (localhost/client).

When I call Node from js app, it works.

But, when I try to call a Cakephp page (localhost/saveData/123) from Node by http.get(); oder http.request for saving data in database, it crash.

events.js:71 throw arguments[1]; // Unhandled 'error' event ^ Error: connect ECONNREFUSED at errnoException (net.js:770:11) at Object.afterConnect [as oncomplete] (net.js:761:19)

Oder

problem with request: connect ECONNREFUSED

I've test width www.google.com, it works. It seems that's the problem is about "localhost".

Could someone help me? :)

EDIT : I've try with 127.0.0.1 too but it doesn't work (for MAMP and Node).

PS : sorry for my english, i'm french :)

Probably you have a local webserver running on port 80. Also programs like Skype can be connected to the port 80.

You can try close Skype and/or Webserver (XAMPP, WAMPP, usbwebserver, etc...).

Listing ports in Cmd.exe

$ netstat -a