Crypto-Tracker Project v. 2.0

I have just finished v. 2.0 of CryptoTracker.  I have the backend server done, and putting the finishing touches on the front-end.  Most of the functionality is there, but I’m still working on formatting.

On the home page, I have a chart and graphs that rely on an api call to cryptocompare.com.  Crypto price charting is done using the react-chartjs-2 library. When I’m logged out, the chart and graph load fine, but when I logged in, I was getting an error: “Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response.”  I was using Axios and tried lots of things to fix it.  Ultimately, I just switched to Fetch and it now works fine, whether I’m logged in or out.

Handy Reference:

Axios Cheat Sheet

Using Axios with React

How to Fetch data in React

Deploy react-crypto-backend on Heroku

I used Httpie.org for command line HTTP requests to test the backend.

Deploy CryptoTracker (react-crypto) – Front End

 

Leave a Reply

Your email address will not be published. Required fields are marked *