A simple REST API in C using microhttpd lib docker-compose and PostgreSQL.
Requires Docker and Docker Compose.
# First: configure credentials
cp .env.sample .env
# Edit .env and set your database name, user, and password
# Second: create the database and table
make dbinit
# Build and start the server
make runThe API will be available at http://localhost:8888.
# Health check
make healthcheck
# List all users
make listusers
# Get user by ID
make getuserbyid id=1
# Create a user
make createuser name="John Doe" email="john@example.com"
# Update a user
make updateuser id=1 name="Jane Doe" email="jane@example.com"
# Delete a user
make deleteuser id=1make stop # Stop containers
make logs # Follow container logs