Simply API for my todo-list app.
GET /tasks
POST /task
Example body: {task: "Make dinner"}
Parameter | Type | Description |
---|---|---|
task |
string |
Required. Add task |
DELETE /task
Example body: {taskId: 4}
Parameter | Type | Description |
---|---|---|
taskId |
int |
Required. Remove task by id |
patch /task
Example body: {taskId: 4, newTask: "Make lunch"}
Parameter | Type | Description |
---|---|---|
taskId |
int |
Required. Existing taskId for modify |
newTask |
string |
Required. New task |
patch /task
Example body: {taskId: 4}
Parameter | Type | Description |
---|---|---|
taskId |
int |
Required. Existing taskId for mark as realized |
Install todo-list-api with git clone
git clone https://github.com/blazej-bryla/todo-list-api
cd todo-list-api
npm install
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. |
Create .env file, copy and paste config from .env.example then modify .env variables.
To run tests, run the following command
npm run test
or
npm run test:watch
API: JavaScript, Node, Express, Jest, MySql, CircleCi