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

Any instructions on how to run the front locally? #668

Open
felipemarinho97 opened this issue Nov 9, 2024 · 4 comments
Open

Any instructions on how to run the front locally? #668

felipemarinho97 opened this issue Nov 9, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@felipemarinho97
Copy link
Contributor

Kyoo's version

No response

What happened?

How can I set the kyoo backend address?
It keeps trying to access "localhost:3000" (the frontend server istelf)

@felipemarinho97 felipemarinho97 added the bug Something isn't working label Nov 9, 2024
@felipemarinho97
Copy link
Contributor Author

After 4 long hours trying I cannot even make the frontend connect with the backend.

  1. The url is not easily configurable. I had to find on the code where to change it, (accounts.tsx, line 61)
  2. After configuring the backend address, login request fails because the backend is responding 405 Method Not Allowed for pre-flight requests on the browser (OPTIONS). Maybe I could change the backend code and explicitly allow this method? Yes, this should work, but its too much and I give up!

This project could have more documentation and be more developer friendly.

@zoriya
Copy link
Owner

zoriya commented Nov 10, 2024

In the .env, you can specify another backend url for this purpose:

# To debug the front end, you can set the following to an external backend
KYOO_URL=

Also, there is a docker-compose.dev.yml that should set everything up for you. You are right, kyoo needs a better contributing page & better schema/readme for technical topics

@felipemarinho97
Copy link
Contributor Author

Okay, this is not working for me, can you try?

git clone https://github.com/zoriya/Kyoo.git
cd Kyoo/front
echo 'KYOO_URL=https://kyoo.darklyn.org' > .env # or https://kyoo.zoriya.dev/
yarn && yarn run web

@zoriya
Copy link
Owner

zoriya commented Nov 11, 2024

KYOO_URL needs to be the api's url. So https://kyoo.darklyn.org/api for you. If you are not using docker-compose, you also need to use the .env. You can either do KYOO_URL=... yarn run web or set -a; source .env; set +a; before running yarn web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants