Following things are used in the setup
- Node.js - Backend
- React.js - Frontend
- MySQL - Database
- Redis - Caching the visit count
Make sure Docker is installed and running on your computer/server.
- Run the following command to create the docker containers
docker compose up --build
- Create the Tables in MySQL
docker exec -i fullstack-app-mysql-1 \
mysql -u root -ppassword -e "
CREATE DATABASE IF NOT EXISTS testdb;
USE testdb;
CREATE TABLE IF NOT EXISTS messages(
id INT PRIMARY KEY AUTO_INCREMENT,
message VARCHAR(256)
);
"
-
Now got to the Browser and hit http://localhost:5001/health For hitting the Backend
-
To hit the frontend go to the http://localhost:3000
Congratulations, You have successfully installed and run the docker containers 🚀