A minimalistic toy API server for managing todos, built with Node.js and Express. This server supports basic CRUD operations for todos, logging, environment configuration, and health checks.
Node.js(withExpress)Yarn(for package management)Alpine Linux(for Docker container)Docker(for containerization)Tini(for handling signals in Docker)Hurl(for populating todos and testing)Make(for simplifying Docker operations)
-
Ensure prerequisites are installed:
-
Start the app: Run the following command to build and start the app in a Docker container:
make
-
Access the app: Once the app is running, open your browser and navigate to:
http://localhost:3000
To test the API, you can use Hurl or any API client like Postman.
You can use the populate.hurl file to populate the server with sample todos. This file contains predefined HTTP requests to create sample data.
Run the following command to execute populate.hurl:
hurl populate.hurlTo test the API endpoints, use the test.hurl file:
hurl --test test.hurlEnsure the server is running before executing these commands.