I’m going through the beta react projects and trying to host them on my website in a
After building my first react app I npm build and uploaded it to
mywebsite.com/projects/ but I get an error when looking for the js and css along the lines
GET https://www.mywebsite.com.com/static/css/main.c9e033a3.css net::ERR_ABORTED
GET https://www.mywebsite.com/static/js/main.49f526a1.js net::ERR_ABORTED
I can get around this by uploading the
static directory from my
build directory to my websites home directory but it seems like a hacky workaround. I know with the naming structure I probably wont run into naming collisions but I also know there has got to be a better way to do this!
I’m hosting using a digitalocean droplet, I believe my answer lies in routing but I have no idea how to set it all up. From the information I could find I think I need to edit the sites-available and/or sites-enabled files but the tinkering I did took down my site until I reverted it.
If anyone has any tips or tutorials I’d appreciate it.