2026-05-05 12:17:25+08
Setting up a development environment with MongoDB, Express, React, and Node can be a configuration nightmare. This prompt generates a ready-to-run Docker Compose file.
Create a docker-compose.yml file for a MERN stack application. Include services for: 1. A MongoDB database. 2. A Node.js backend. 3. A React frontend (Vite). Ensure volumes are set up for hot-reloading in development.
The "hot-reloading" part is essential. Without it, you have to rebuild your containers every time you change a line of code, which kills productivity.
services: db: image: mongo backend: build: ./backend ...