Skip to content

LouisGastineau/TP-4-EKOD-GASTINEAU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Simple REST API with Docker 🐳

This is a school exercise project:
A tiny REST API built with Express (Node.js) that does a basic CRUD (Create, Read, Update, Delete).

It runs with Docker using two containers:

  • API container β†’ runs the Express server (port 8080)
  • Database container β†’ stores the data

✨ What it does

  • GET /items β†’ list all items
  • GET /items/:id β†’ get one item
  • POST /items β†’ add a new item
  • PUT /items/:id β†’ update an item
  • DELETE /items/:id β†’ remove an item

πŸš€ How to run

Make sure you have:

Then:

# clone the repo
git clone https://github.com/your-username/your-repo.git
cd your-repo

# start containers
docker-compose up --build

By default:


βš™οΈ Stopping & Rebuilding

# stop everything
docker-compose down

# rebuild after making changes
docker-compose up --build

πŸ“‚ Structure

β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ routes/       # API routes (CRUD)
β”‚   β”œβ”€β”€ controllers/  # Functions that handle logic
β”‚   └── server.js     # Express app entry
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ Dockerfile
└── README.md

[## πŸŽ“ Note] (https://louisgastineau-4630052.postman.co/workspace/Gaste's-Workspace~f1425d52-e733-4c55-82b9-829fc62ad983/request/48296522-689df85b-4f0b-4700-9aa6-b946fd6397de?action=share&creator=48296522&ctx=documentation) Postman Requests to use API

This is just a practice project, not meant for production. It’s only here to learn how to combine Express + Docker + Database. UwU

About

TP4 EKOD on database and docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published