The demo app showcases a task manager service implemented using the Actix Web Rust framework
- Rust installed on your machine.
-
Clone the repository:
git clone [email protected]:falila/demo-task-manager-service.git cd task-manager-api
-
Build the project:
cargo build
-
Run the application:
cargo run
The API will be accessible at
http://localhost:8000
.
-
Create Task:
- Endpoint:
POST /tasks
- Request Body: JSON with task details.
- Endpoint:
-
Retrieve Tasks:
- Endpoint:
GET /tasks
- Returns a list of all tasks.
- Endpoint:
-
Retrieve Task by ID:
- Endpoint:
GET /tasks/{id}
- Returns details of the specified task.
- Endpoint:
-
Update Task:
- Endpoint:
PUT /tasks/{id}
- Request Body: JSON with updated task details.
- Endpoint:
-
Delete Task:
- Endpoint:
DELETE /tasks/{id}
- Deletes the specified task.
- Endpoint:
curl -X POST -H "Content-Type: application/json" -d '{"title": "Example Task", "description": "This is a sample task."}' http://localhost:8000/tasks
curl http://localhost:8000/tasks
curl http://localhost:8000/tasks/{task_id}
curl -X PUT -H "Content-Type: application/json" -d '{"title": "Updated Task"}' http://localhost:8000/tasks/tasks/{task_id}/items/{item_id}
ab -p task.json -T application/json -n 100000 -k -c 30 -q http://127.0.0.1:8080/tasks