Skip to content

krish21-j/fullstack-docker-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Fullstack Docker App

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.


πŸ“‚ Project Structure

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 ------------------------------


πŸš€ Features

βœ… Backend (Node.js + Express + PostgreSQL)

  • 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.

βœ… Frontend (React)

  • 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.

βœ… Database (PostgreSQL)

  • Managed through a Docker volume (db-data/).
  • Configurable via environment variables in .env file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published