Code Monkey home page Code Monkey logo

demo-task-manager-service's Introduction

demo-task-manager-service

The demo app showcases a task manager service implemented using the Actix Web Rust framework

Features

Getting Started

Prerequisites

  • Rust installed on your machine.

Installation

  1. Clone the repository:

    git clone [email protected]:falila/demo-task-manager-service.git
    cd task-manager-api
  2. Build the project:

    cargo build
  3. Run the application:

    cargo run

    The API will be accessible at http://localhost:8000.

API Endpoints

  • Create Task:

    • Endpoint: POST /tasks
    • Request Body: JSON with task details.
  • Retrieve Tasks:

    • Endpoint: GET /tasks
    • Returns a list of all tasks.
  • Retrieve Task by ID:

    • Endpoint: GET /tasks/{id}
    • Returns details of the specified task.
  • Update Task:

    • Endpoint: PUT /tasks/{id}
    • Request Body: JSON with updated task details.
  • Delete Task:

    • Endpoint: DELETE /tasks/{id}
    • Deletes the specified task.

Examples

Create Task

curl -X POST -H "Content-Type: application/json" -d '{"title": "Example Task", "description": "This is a sample task."}' http://localhost:8000/tasks

Retrieve Tasks

curl http://localhost:8000/tasks

Retrieve Task by ID

curl http://localhost:8000/tasks/{task_id}

Update Task

curl -X PUT -H "Content-Type: application/json" -d '{"title": "Updated Task"}' http://localhost:8000/tasks/tasks/{task_id}/items/{item_id}

Benchmark Task

ab -p task.json -T application/json -n 100000 -k -c 30 -q http://127.0.0.1:8080/tasks

demo-task-manager-service's People

Contributors

falila avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.