I'm trying to deploy a React app that uses React Router v7 to Hostinger's shared hosting. When I run npm run build
, the build
command generates a folder with two subdirectories:
client
and server
.
However, I'm unable to find an index.html
file in the output, which makes it difficult to deploy the app to Hostinger.
My plan is to upload the entire build folder (or its contents) into the public_html
directory through Hostinger's file manager, but I’m unsure how to proceed since the index.html
file is missing.
I’ve also tried using an .htaccess
file to manage routing and redirection, but it hasn’t resolved the issue.
What is the correct way to deploy this React app to Hostinger, and how should I handle the missing index.html
file?
Edit: I can view the build version correctly when i do it locally, using npm start, where i have this command:
"start": "cross-env NODE_ENV=production react-router-serve ./build/server/index.js",
is there a way to get serve the website using the index.js?