benzend / goalboard-collab

0 stars 1 forks source link

Updating ENV build and DB testing #16

Closed GwartneyDev closed 6 months ago

GwartneyDev commented 6 months ago

I have began adding in DB quires for create goals file. I have not been able to run and test this yet. I have also am almost done getting the .env file set up i just need to read the values back into the code once its created. I also needed to note that im setting this in a .env file like other frameworks in JS and PHP do. As other tools use the go env. Which we can swap to but I feel like its easier to know what to modify and change directly since we can just do a git ignore ect.

I will finish testing the rest of this later today.

GwartneyDev commented 6 months ago
  1. Added file reader in to parse .env file to keep db information secret for when project is actually hosted.

  2. Tested db connection and did some testing on the front end to make sure cors was enabled.

  3. Note that in the back end create users file there is a test funciton func enableCorsAgain(w http.ResponseWriter) { (w).Header().Set("Access-Control-Allow-Origin", "*") }

This will be removed as its just a copy paste for now I need to start splitting things up into util functions to be used across the code base.

  1. I was able to successfully send data from the front end and log it. So I just now need to take and create the actual database table and send the query params in ect to store it to finalize crud. However there is a issue on the front in in the register class you will notice I removed the routing from /user:id/new or however it was sent. I did this for now just as I dont have the database set up to parse that just yet. And wanted to make sure it was working since it would come from the query from the database.

However when I just routed it back to the main login page, it was throwing an error that I have created an issue with a screen shot for you to look at as I was uanble to see where this might be happening my self. And just need someone to take a seconded look.

  1. this however should now be able to be merged and tested with docker now as well to be further tested on your end.