This works for react apps that are bootstraped with Facebook's create-react-app tool. The script will build and deploy your app using nginx. It serves a production build of your app. Currently the app only works for cases in which the user does not have any other nginx configuration. I'm still working on the script to add the app to an already existing nginx configuration.
The script will install nginx on your system. Currently I've only tested it's compatibility with Ubuntu 19.04.
- Clone this repository and navigate to /react-autohost
- Give host.sh executable permissions by
sudo chmod +x ./host.sh - Run
./host.sh. The script will guide you through the process.