A full-stack web application built with React (frontend), Express (backend), and PostgreSQL (database). This project demonstrates a simple architecture for connecting a React app to an Express API, which in turn communicates with a PostgreSQL database.
fullstack-docker-app/ βββ backend/ β βββ app.js β βββ package.json βββ frontend/ β βββ package.json β βββ src/ β βββ App.js βββ db-data/ --------------- --------------------- # For database volume βββ docker-compose.yml ----------------- # Empty, βββ .env -------------------------------------------- # Empty for future use. βββ README.md ------------------------------
- Connects to PostgreSQL using
pg
library. - Provides
/api
endpoint that returns the current server time from the database. - Simple error handling for database connection issues.
- Fetches API response from the backend.
- Displays the message in a minimal UI.
- Uses
"proxy": "http://localhost:5000"
to forward requests to the backend during development.
- Managed through a Docker volume (
db-data/
). - Configurable via environment variables in
.env
file.