weinde
weinde

Reputation: 1156

ERR_CONNECTION_REFUSED when trying to log in in Angular app

I'm trying to set up an Angular app on my computer to continue the development. The front-end is made in Angular 7.1.4 and for the back-end Slim-3 is being used.

I have set everything up and on the ng serve the app compiles without any errors. The first screen is the login and when I try to log in I get this error in the console:

POST http://localhost:8888/api/auth net::ERR_CONNECTION_REFUSED

My app is running on localhost:4200, the URL for api is http://localhost:8888/api/ this is set in the enviroments.ts file and in my proxy.conf.json file I have this code:

{
    "/api": {
      "target": "http://localhost:8887",
      "secure": false
    }
}

I am also using MAMP...

EDIT: I have also tries setting all the ports to 4200 but it also didn't work

What am I doing wrong that I cant login in the app?

Upvotes: 0

Views: 277

Answers (0)

Related Questions