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
GET /itemsβ list all itemsGET /items/:idβ get one itemPOST /itemsβ add a new itemPUT /items/:idβ update an itemDELETE /items/:idβ remove an item
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 --buildBy default:
- API runs on http://localhost:8080
- Database runs inside the Docker network
# stop everything
docker-compose down
# rebuild after making changes
docker-compose up --buildβββ 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