Chrome Extension

Deploy React application from subdirectory

The code snippet shows how to deploy your React application from a sub-directory or folder
// OPEN  package.json FILE AND ADD "homepage": "/folder-name/"
{
    "name": "firm-survey-2020",
    "version": "0.1.0",
    ...
    "homepage": "/folder-name/" //AD ONLY THIS AT THE BOTTOM
}

//OPEN ROUTING FILE AND ADD basename={'folder-name'}
<Router history={browserHistory} basename={'folder-name'}>
  <Route path="/" component={App} />
</Router>
We are a bunch of lazy programmers so we developed this chrome extension
search code from your favorite search engine
Install Now

Search Index Data (The code snippet can also be found with below search text)

serve react app from folder
Was this helpful?
0 Comments
Open Code Manager We are hiring