Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2-data-table-finished port mismatch #1

Open
kjenney opened this issue Feb 28, 2018 · 1 comment
Open

2-data-table-finished port mismatch #1

kjenney opened this issue Feb 28, 2018 · 1 comment

Comments

@kjenney
Copy link

kjenney commented Feb 28, 2018

The HTTP Request from the Frontend is being directed to the same server/port:

"Http failure response for http://localhost:4200/api/courses: 404 Not Found"

while the backend server is running on port 9000. Shouldn't the request be going to http://localhost:9000/api/couses?

@bramleffers
Copy link

@kjenney This app uses a proxy to redirect all calls. Did you use ng serve instead of npm run start? If that's the case there is your problem. If you want to serve the application on a other port you can do so by using the following command; ng serve --port=XXXX --proxy-config ./proxy were XXXX is the desired port number. The proxy config is in proxy.json in the root of the project.
For more information about using a proxy take a look at this article https://juristr.com/blog/2016/11/configure-proxy-api-angular-cli/ or the official docs https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/proxy.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants