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!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

exercise/06-LifecycleMethod DataApi doesn't work

tetron opened this issue · comments

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.

Is it because the 3rd party babe

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