MockZilla is an app where you can mock and store your own API calls and use those calls wherever possible while development phase.
Go to /client directory create a new .env.development
file and add this code
Then run this in your terminal:
Once all containers bootup: You can access client from http://localhost:3001
Goto /client directory and run
Check if your react server is running properly, then run this command:
This will generate build folder outside client directory.
Before starting up server, you will have to install redis.
Steps are as follows:
Install redis server on your local machine and run it on default port Redis Download and follow Mac/Windows installation steps.
Once setup is done, start the redis server with:
Now navigate to /server directory create a new .env
file and add this code
and run
and
Once it connects to redis server, you can visit port 8080: localhost:8080
Your server with react app is up and running on localhost!
Run root Dockerfile, it will output image.
Make sure you mention redis production version in /server/index.js
Now you can
use this image to deploy on production.