tyroprogrammer / learn-react-app

Application that will help you learn React fundamentals. Install this application locally - there's tutorial, code snippets and exercises. The main objective of this project is to help you get off the ground with React!
MIT License
3.65k stars 328 forks source link

exercise/06-LifecycleMethod DataApi doesn't work #31

Closed tetron closed 5 years ago

tetron commented 5 years ago

First off, thanks for this tutorial, it's very nice!

I noticed in doing exercise/06-LifecycleMethod that the data is not loading.

Proxy error: Could not proxy request /api/company/profile/AMZN from 172.17.0.3:3000 to https://financialmodelingprep.com. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET). Proxy error: Could not proxy request /api/company/profile/AMZN from 172.17.0.3:3000 to https://financialmodelingprep.com. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (EAI_AGAIN).

I tried changing API_BASE to const API_BASE =https://financialmodelingprep.com/api/company/profile; but then the browser wouldn't load it due to financialmodelingprep.com

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://financialmodelingprep.com/api/company/profile/AMZN. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

I suggest simplifying the tutorial so that the data is served by the tutorial instead of going to a 3rd party resource.

Shmashmoe commented 5 years ago

Is it because the 3rd party babe

Shmashmoe commented 5 years ago

https://github.com/pomber/git-history/blob/master/public/manifest.json

tyroprogrammer commented 5 years ago

@tetron - I have removed the dependency to that 3rd party service. DataAPI now serves randomly generated data but does not have any dependency!