jintae1954 / Todo-API

사각 토이 프로젝트-백엔드

Home Page:https://todo-api-nodejs.cyclic.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Todo API

Table of contents

Overview

I made this API for my Todo App to handle user registration, authentication, CRUD operations of todo items and saving data in MongoDB.

The Challenge

API should handle the following:

  • Create a new user and save user data in the database
  • User Sign in Process & sending authentication token
  • User Sign out Process & deleting authentication token
  • Create a new todo for a user and save it in the database
  • Get all todo items of the user
  • Delete a todo item from the database

Built with

Endpoints

Create New User

[POST] "http://localhost:4000/sign_up"
Method POST
Body {"name": "Hatem" , "email": "hatem@gmail.com" , "password": "123456"}

Sign in a user

[POST] "http://localhost:4000/sign_in"
Method POST
Body {"email": "hatem@gmail.com" , "password": "123456"}

Sign out a user

[GET] "http://localhost:4000/sign_out"
Method GET

Get a user information (name and email)

[GET] "http://localhost:4000/user"
Method GET

Get all todo items of a user

[GET] "http://localhost:4000/1"
Method GET
Parameters User Id

Create a new todo item

[POST] "http://localhost:4000/1"
Method POST
Parameters User Id
Body {"content": "learn a new language"}

Delete a todo item

[DELETE] "http://localhost:4000/1/2"
Method DELETE
Parameters User Id, Todo Id

Deployment

Author

About

사각 토이 프로젝트-백엔드

https://todo-api-nodejs.cyclic.app/


Languages

Language:JavaScript 100.0%