This project contains examples for customizing CRA development experience. See package.json for further implementations.
yarn
Add to package.json to forward unknown requests in development to proxy defined. eg
"proxy": "http://localhost:4000",
More information: https://create-react-app.dev/docs/proxying-api-requests-in-development
yarn start-https-local
- Add custom domain host to /etc/hosts
vi /etc/hosts
127.0.0.1 example.com
- generating dev certs with mkcert:
brew install mkcert
mkcert -install
mkcert example.com localhost 127.0.0.1 ::3000
mkdir certs; mv *.pem certs
yarn start-https-custom
- Add custom domain host to /etc/hosts
vi /etc/hosts
127.0.0.1 example.com
- generating dev certs with mkcert:
brew install mkcert
mkcert -install
mkcert example.com localhost 127.0.0.1 ::3000
mkdir certs; mv *.pem certs
yarn start-https-custom
or install ssl-proxy via
go get github.com/suyashkumar/ssl-proxy
yarn start-https-custom2
Other local https examples: https://github.com/HugoDF/docker-compose-local-https
other: https://github.com/containous/traefik/
This project was bootstrapped with Create React App.