I have been trying to replace a WordPress website with one I have coded myself using HTML, CSS and JS with node.js and react. I have a domain name on GoDaddy with a Web Hosting option. When I connect to it, it send me to my cPanel Admin page.
I’ve uploaded the entire folder where my website files are in the public_html folder with the File Manager and changed .htaccess to make sure it redirect the request to the index.html file :
RewriteEngine On
DirectoryIndex site/public/index.html site/src/index.js
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ public/index.html [L]
Now, when I open the page on Google Chrome, I get a blank page. I can see the code from the index.html file when I inspect the page so i don’t know why it won’t run the js file and the rest of the code.
see inspect results
I tried to add a console.log on the beginning of my index.js to see if it runs but it never appears on the console.
user26048724 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.