Skip to content

a-berezhkov/TODO_clear_js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TODO list with clear js

  1. HTML
    1. generated by pug file (https://pugjs.org/)
  2. JS
    1. tasks.js - acync functions
    2. app.js - initial and observe
    3. listeners.js - listeners =)
    4. styles.js - draw card
  3. CSS
    1. use SASS
    2. colors.sass - colors
    3. style.sass - all another

Url for requests : http://24api.ru/

Documentation for API

Example request (create new task)

 const data = {
        "name": name,
        "user_id": userId,
        "isDone": 0
    }

    const response = await fetch("http://24api.ru/rest-todo", {
        method: 'POST',
        mode: 'cors',
        headers: {
            'Content-Type': 'application/json'
        },
        body: JSON.stringify(data)
    });
    if (!response.ok) {
        const message = `An error has occured: ${response.status}`;
        throw new Error(message);
    }
    return await response.json();

About

TODO pet with js, sass, pug based in REST API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published