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

Get APY results from backend endpoint #458

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

michalsmiarowski
Copy link
Contributor

@michalsmiarowski michalsmiarowski commented Jun 7, 2021

Depends on https://github.com/keep-network/website-backend/pull/17

Get APY result from the website-backend instead of counring it on the frontend.

Steps to run it locally:

  1. website-backend: go to the /calculate-apy route in flask.py and change line

    @cross_origin(origins=re.compile('https://(.+\.)?keep\.network'))

    to

    @cross_origin(origins=http://localhost:<host_number_of_the_frontend_app'))

    Rebuild and rerun the docker image after (you will probably have to also remove the current image before reruning it)

  2. Frontend app: Got to redux.js and change API_URL variable to:

    export const API_URL = "http://localhost:<host_number_of_the_backend_app>"

Get APY result from the website-backend instead of counring it on the frontend.
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

Successfully merging this pull request may close these issues.

1 participant