I have a react app created with create-react-app
how can deploy to render without having to write a server? Here is my code:
`import React from n'reactn';
import ReactDOM from n'react-dom/clientn';
import App from n'./App.jsxn';
import { BrowserRouter } from "react-router-dom";
import { AuthContextProvider } from "./AuthContext";
import n'./App.scssn';
import n'./pages.scssn';
const root = ReactDOM.createRoot(document.getElementById(n'rootn'));
root.render(
<AuthContextProvider>
<BrowserRouter>
<App />
</BrowserRouter>
</AuthContextProvider>
);
Answers on deployment to Heroku are welcomed.
I tried to upload a react app to render.com, the project deployed successfully. But if I try to visit other paths likes /news and refresh the page, I get a blank screen with Not Found
response.
Kibet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.