reactjs - React CLI web directory -


i created react app using react cli. in dev runs root of web server:

http://localhost:3000

using npm start:

"start": "react-scripts start"

when run build deploy it, need put specific web site on our iis server, url end being:

https://web-server/myapp

i know have change react routing don't know how tell react start script work web directory in specific folder, , include in build. possible? want run app in dev mode folder deploying don't have change it. don't want have modify react scripts.

i found how it. in package.json, specified homepage:

"homepage": "https://myserver/myapp", 

then updated routing:

<route path="/myapp" components={app}> 

when deployed iis work perfect. details can found on react cli github site:

building relative paths


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -