-
Clone the Repository:
git clone https://github.com/nishaYO/contact-me.git
-
Run Installation Commands:
cd client npm install cd ../server npm install
-
Create .env File in Root Directory:
cd .. touch .env
-
Enter MongoDB Connection Details in .env:
MONGO_URI=MONGO_URI=mongodb+srv://<username>:<password>@<server-address>.mongodb.net/<database-name>?retryWrites=true&w=majority MONGO_USERNAME=<username> MONGO_PASSWORD=<passowrd>
-
Open Docker Desktop
-
Run Containers:
docker-compose up -d
-
Stop Running Containers: If you've finished exploring the codebase, gracefully stop the running containers using:
docker-compose down
- MongoDB
- Node.js
- Express.js
- React
- SCSS
- Docker
- User inputs data in the contact form.
- Frontend performs input validation.
- POST request with inputs sent to the backend (localhost:5000) in JSON format.
- Backend performs input validation.
- JSON parsing on inputs.
- Document created using inputs and saved in MongoDB.
- If any errors, response with a 500 status code sent to the frontend.
- Success message sent to the frontend on successful submission.
- User notified of errors or successful submission.