- Run
yarnto install dependencies. - Then run
yarn startto start the app. - Load
http://localhost:3001in your browser.
- Ensure the
/.build.shfile is executable viachmod +x ./build.sh. - Build the docker image by executing
./build.sh. - Run
SECURITY_TOKEN_SECRET='security secret' docker run -d -p 80:3001 -e SECURITY_TOKEN_SECRET universal-react-appto run the container. Run the container while connected to a remote docker-machine such as digital ocean to deploy.
SECURITY_TOKEN_SECRETis used to create JSON web tokens for authenticating users. DO NOT forget to set this for production deployments.
Optionally, you can run yarn run build and deploy the output dist directory; running the command node server/server.js within the dist directory.