Giter VIP home page Giter VIP logo

simple-todo-server's Introduction

Simple TODO server

This is a simple TODO RESTful server written in Node. It uses a simple JSON format.

Requirements

Installation

Open a terminal and run the following command:

npm install

Usage

Open a terminal and run the following command:

npm run start

The server will start on port 3000, if it is free. If you want to change the port, see the Configuration section.

Use the API section to know what is available to use on the server.

Configuration

In order to change the port of the server, you can change the port variable inside src/index.js.

API

Postman collection

https://www.postman.com/orange-crescent-818445/workspace/tues/collection/2920644-1b02d0c2-43f4-42f2-b259-d3a259a33d09?action=share&creator=2920644

GET /tasks

Returns a list of tasks.

curl http://localhost:3000/tasks

GET /tasks/:id

Returns a task.

curl http://localhost:3000/tasks/{taskId}

POST /tasks

Creates a new task.

curl -X POST -H "Content-Type: application/json" -d '{"title":"Buy milk", "description": "A 3.7% one", "completed": "false", "isInProgress": "false" }' http://localhost:3000/tasks

PUT /tasks/:id

Updates a task.

curl -X PUT -H "Content-Type: application/json" -d '{"title":"Buy tea", "description": "A green one", "completed": "false", "isInProgress": "false" }' http://localhost:3000/tasks/{taskId}

DELETE /tasks/:id

Deletes a task.

curl -X DELETE http://localhost:3000/tasks/{taskId}

License

MIT

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.