Git Product home page Git Product logo

todo-list-api's Introduction

CircleCI

Todo-list-API

Simply API for my todo-list app.

API Reference

Get all items

  GET /tasks

Add item

  POST /task
  Example body: {task: "Make dinner"}
Parameter Type Description
task string Required. Add task

Delete item

  DELETE /task
  Example body: {taskId: 4}
Parameter Type Description
taskId int Required. Remove task by id

Modify existing task

  patch /task
  Example body: {taskId: 4, newTask: "Make lunch"}
Parameter Type Description
taskId int Required. Existing taskId for modify
newTask string Required. New task

Mark task as realized

  patch /task
  Example body: {taskId: 4}
Parameter Type Description
taskId int Required. Existing taskId for mark as realized

Project Installation

Install todo-list-api with git clone

  git clone https://github.com/blazej-bryla/todo-list-api
  cd todo-list-api
  npm install

Database Setup

Todo-list-api based on Mysql Database

Create database

  Create simple database for example: "todo",

Create table

  Create table with 3 fields for example: "tasks"
Parameter Type Description
id int Required.
task varchar Required.
isRealized Boolean/tinyint Required.

Setup database in Project

Create .env file, copy and paste config from .env.example then modify .env variables.

Running Tests

To run tests, run the following command

  npm run test
  or
  npm run test:watch

Tech Stack

API: JavaScript, Node, Express, Jest, MySql, CircleCi

todo-list-api's People

Contributors

blazej-bryla avatar

Stargazers

Patryk Penczek avatar Tobiasz Luszowski 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.