0.0.1 • Published 4 years ago

adnan-redirect v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

deploy-react

install

npm install -g deploy-react

New feature :fire: Proxy :fire:

deploy-react with proxy in "production" :

image

setupProxy.js must be in the src folder ./src/setupProxy.js

setupProxy.js :point_down: template :point_right: http-proxy-middleware https://github.com/chimurai/http-proxy-middleware

deploy-react -d build -proxy

deploy current folder

cd react/app/build_folder

deploy-react .

deploy to specific directory

deploy-react -d specificDirectory

deploy to specific entry name

deploy-react -e entryName.html

deploy to specific port

deploy-react -p 8080

deploy with https

Note the next files must be exist in parent dir of the entry file

  • -> build/index.html
  • sslcert/server.key
  • sslcert/server.crt
  • sslcert/ca.crt // if you don't have create an empty file "touch ca.crt"
deploy-react -https .

Hint ,, you can write this scripts in package.json of react to get auto deploy

"scripts": {
	"postinstall":"npm install -g deploy-react",
    "start": "deploy-react -d build"
	}

License

MIT

0.0.1

4 years ago

1.4.1

4 years ago