w00kster / mariokart-leaderboard

3 stars 0 forks source link

Create functionality to link UI to DB #7

Open rosiemaguire opened 1 year ago

rosiemaguire commented 1 year ago

Our current user interface is unable to save data entered in the form as there is no linked action to the post method and there is no link to the MySQL database where we anticipate the data to be stored.. The end goal is for users to be able to successfully upload their best lap times and for this saved data to be reflected in the user interface.

We will need to write code that links the website to the MySQL database and allows users to write to the database using the HTML Form. It is currently anticipated that this will be done using JavaScript.

rosiemaguire commented 1 year ago

I have successfully created and tested the functions in connect.js using my user creds in .env file (added to gitignore and has not been pushed up) and mariokart-leaderboard-ca-certificate.crt (also added to gitignore and not been pushed up). Pushed connect.js up to repo for @Sully1793 to test.

@w00kster has suggested condensing number of files by having SSL Certificate defined in the .env file. This would also remove the need for installing the file-system package if we are using dotenv for both. Currently facing errors regarding "self signed certificates" when defining Certificate in .env file and calling on it that way in function. image

Next steps: