I am working on a Golang database project, in which I would like to use React to create the front-end. I am using react scripts linked to my index.html.
When I open my index.html directly, my react scripts work and the page is properly formatted. However, when I try to open the page through my server, the scripts are not found and I get a 404 error:
I am thinking the issue is with using the http.FileServer to access the html. I have tried locating my build folder in variety of locations, most recently within the views folder, always with the same result, that when opening the html directly the react scripts work, but they do not work when the html is accessed by my server.
Is there another method I should be using to accomplish this, or is it a problem with how I am organizing my dependencies?