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

Backend Error #22

Open
dwi4122 opened this issue Dec 28, 2024 · 7 comments
Open

Backend Error #22

dwi4122 opened this issue Dec 28, 2024 · 7 comments

Comments

@dwi4122
Copy link

dwi4122 commented Dec 28, 2024

Deploy the mysql database to the vercel project. No players are showing in the deployed project.

Screenshot 2024-12-28 at 2 35 31 pm
@TharunKumarrA
Copy link
Owner

ok @dwi4122, the backend repo for now is missing the schema.sql file that will create all the tables for storing player details. The file will be pushed by eod and then you can run the backend locally. With my vercel plan I cant have the backend running in deployment. Hope you understand

@TharunKumarrA
Copy link
Owner

There was an issue created to address the same issue in the backend repo, in the mean time if you are comfortable replicating the database locally in the machine I am attaching the snaps of the table structure

@TharunKumarrA
Copy link
Owner

and @dwi4122 if you are willing you can take up the issue in the backend repo for database initialization and grab that bounty ;)

@thecodingvivek
Copy link
Contributor

@dwi4122 I have got the same issue. After going through the code finally i understood that :

1)No need to deploy the sql database on vercel because as we are working on this project locally just try to install mysql . you can checkout this link to install : https://www.youtube.com/watch?v=BxdSUGBs0gM

2)create tables with schemas
example in mysql command line
image

3)add database credentials in sqlconnect.js
image

4)Create an account in ngrok. https://ngrok.com/ and copy the authtoken and add it your .env file
in server.js
image

5)Try running the server You should should see Something like this in your terminal
image

6)Now add the url shown in the terminal to your constants.js file
image

7)You will now get a cors error so add header to allow requests from all origins: res.header("Access-Control-Allow-Origin", "*");
image

8)Your fine to go now.HOPE THIS HELPS :)

@TharunKumarrA
Copy link
Owner

Yeah for now this is how to access backend. Great explanation @thecodingvivek

@thecodingvivek
Copy link
Contributor

thecodingvivek commented Dec 28, 2024

@TharunKumarrA Anna can i share this comment on backed repo for database initialisation to solve this issue ..?

@TharunKumarrA
Copy link
Owner

Yeah sure that would help

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

No branches or pull requests

3 participants