Skip to content

LittleOddBoy/todo-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

35 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

todo-api

๐Ÿ“ƒ a RESTful API to allow users to manage their to-do list. This project is one of which is in the roadmap.sh back-end project. Me and ME-Atish are contributing to build this project, but you may find the project in Community Solutions under my profile.

If you want to use this API, we designed a CLI tool called todo-cli. Check that out!

currently, under maintenance

Maintenance to-do

  • handle user authentication. (both)
  • build an endpoint to remove a task. (assigned to ME-AT)
  • build an endpoint to update a task.
  • build an endpoint to read all the task. (assigned to ME-AT)
  • build the README file.
  • build an appropriate API document.
    • Due to project paradigm being functional, and low possibilities for express.
  • insert the project link on roadmap.sh

Requirements

You may need the following being installed in order to run the project:

  • Node.js and its package manager, npm
  • MongoDB

Installation

This is an API and you won't expect too much installation, you just clone the repository:

git clone https://github.com/LittleOddBoy/todo-api.git .

and run this command to build the code:

npm run build

and at the end, run the API with:

npm run start

It might be helpful if you set up an .env file in order to configure MongoDB and execution port in the way you want; This is how the file should look like:

PORT=THE_PORT_YOU_PREFER
MONGO_URI=YOUR_DB_URI

It's okay if you don't pay attention to this file, because we have some defaults for it.

Usage

Unfortunately, we don't have a plan to provide a better documentation for this projectโ€”at least for now. But in overall, there are certain endpoints you could run:

  • todos/create with a JSON as the body of your request, contains only the title and the completed status of the task, first one as string and second as boolean.
  • todos/read that automatically responses with your todos.
  • todos/remove with a JSON as the body contains the ID of your task you wanna delete.
  • todos/update with the same approach as create, but with the id of the task you want to update.
  • users/signin with your username and a password in the body of request, in order to create an account. the response would be a private token that you may need to keep that in a good place!
  • users/login again with your username and password, to log-in your account and get your token again. don't forget to keep your token safe!

Credits and license

My friend and I got this project done under MIT License. You must check him out! -> ME-Atish

About

๐Ÿ“ƒ a RESTful API that allows users to manage their tasks.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •