Giter Club home page Giter Club logo

to-do_list's Introduction

To-Do_List

A nodejs backend for to-do list app.

Running To-Do_List app

create .env file in root directory of app with keys "MONGO_URL", "PORT", "JWT_PRIVATE_KEY".
"MONGO_URL" is the url of mongodb database.
"PORT" is the network port on which server listens.
"JWT_PRIVATE_KEY" is the secret key of jwt token.
eg

MONGO_URL=mongodb+srv://user:[email protected]  
JWT_PRIVATE_KEY=secret34566
PORT=4000

Make sure that nodejs environment is working. In root directory run

    npm install  
    npm run dev 

Deployed URL

The URL of the site is https://antony0101.github.io/To_do_list_frontend/.
This server is already deployed in Cyclic nodejs deployment platform.
The URL of the server is https://rich-lapel-toad.cyclic.app.
Front-End respository is https://github.com/Antony0101/To_do_list_frontend.git.

API paths

Authentication /auth

/auth/signup - Create a new user and returns the authentication token.

request

http operation - POST
Header parameters - None
Path parameters - None
Request body - json
userid - userid to create new user. Should be atleast 3 characters long. required field.
password - password of the new user. Should be atleast 4 characters long. required field.
eg. {"userid":"john",
"password":"pass123"
}

response

Response body - json
success:
message - "success"
token - authentication token
failure:
message - "failed"
error - error message

/auth/signin - authenticate a existing user and returns the authentication token.

request

http operation - POST
Header parameters - None
Path parameters - None
Request body - json
userid - userid to create new user. Should be atleast 3 characters long. required field.
password - password of the new user. Should be atleast 4 characters long. required field.
eg. {"userid":"john",
"password":"pass123"
}

response

Response body - json
success:
message - "success"
token - authentication token
failure:
message - "failed"
error - error message

/auth/signout - signout a user.

request

http operation - POST
Header parameters - Bearer Token
Path parameters - None
Request body - None

response

Response body - json
success:
message - "success"
failure:
message - "failed"
error - error message

/auth/signoutall - signout a user from all devices.

request

http operation - POST
Header parameters - Bearer Token
Path parameters - None
Request body - None

response

Response body - json
success:
message - "success"
failure:
message - "failed"
error - error message

Task /task

/task/create - Create a new task.

request

http operation - POST
Header parameters - Bearer Token
Path parameters - None
Request body - json
name - Name of the task.
priority - Priority of the task. Should be a integer in range 1-9.
eg. {"name":"task1",
"priority":"3"
}

response

Response body - json
success:
message - "success"
newtask - details of the created task.
failure:
message - "failed"
error - error message

/task/list - List all task of that user.

request

http operation - GET
Header parameters - Bearer Token
Path parameters - None
Request body - None

response

Response body - json
success:
message - "success"
tasks - list of task created by that user
failure:
message - "failed"
error - error message

/task/report - List count of tasks and task list of the user.

request

http operation - GET
Header parameters - Bearer Token
Path parameters - None
Request body - None

response

Response body - json
success:
message - "success"
count - count of pending, completed, canceled and deleted task.
tasks - list of task created by that user
failure:
message - "failed"
error - error message

/task/completed/:index - Mark a pending task of that user as completed.

request

http operation - Patch
Header parameters - Bearer Token
Path parameters - index of the task
Request body - None

response

Response body - json
success:
message - "success"
failure:
message - "failed"
error - error message

/task/cancel/:index - Mark a pending task of that user as canceled.

request

http operation - Patch
Header parameters - Bearer Token
Path parameters - index of the task
Request body - None

response

Response body - json
success:
message - "success"
failure:
message - "failed"
error - error message

/task/delete/:index - Delete a task created by that user.

request

http operation - Patch
Header parameters - Bearer Token
Path parameters - index of the task
Request body - None

response

Response body - json
success:
message - "success"
failure:
message - "failed"
error - error message

to-do_list's People

Contributors

antony0101 avatar

Watchers

 avatar

Forkers

the-jin-799

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.