Skip to content

ragaslan/express-todo-api

Repository files navigation

express-todo-api

express API for multi-user to-do list application

Getting Started

Download the node (if it does not exist)

First, you need to download node js

https://nodejs.org/en/

All Dependencies | Packages

  • bcryptjs
  • cookie-parser
  • cors
  • dotenv
  • express
  • express-async-handler
  • jsonwebtoken
  • mongoose
  • multer
  • nodemon

Download dependencies by using npm install method

We should download dependencies by using npm install method.

npm install

Mongo Database

First, if you have not a mongo database account you should sign up with this link

Then, we need to get a connection url

Steps:

First, you need to log in after registration. Then click the connect button

Then, you need to click the second button

Now, you have an url for database connection. Replace the part of your connection URL with your password

Before using this API. You need to configure someting in .env file

One of these is DB_URI. You should change DB_URI's value with your mongodb database connection URL that you created above

Run the app

npm run dev

USAGE

AUTH

POST - Register process for user

http://localhost:5000/api/auth/register

POST - Login process for user

http://localhost:5000/api/auth/login

GET - Show user profile

http://localhost:5000/api/auth/profile

GET - Logout process for user

http://localhost:5000/api/auth/logout

POST - Upload profile image process for user

http://localhost:5000/api/auth/upload

TODO

GET - Show a todo with todo's id

http://localhost:5000/api/todo/show/:id

GET - Show all todos

http://localhost:5000/api/todo/all

POST - Create a todo

http://localhost:5000/api/todo/create

DELETE - Delete a todo using todo id

http://localhost:5000/api/todo/delete/:id

PUT - Update a todo using todo id

http://localhost:5000/api/todo/update/:id

GET - Complete a todo using todo id

http://localhost:5000/api/todo/complete/:id

@ragaslan
Istanbul / Turkey

About

express API for multi-user to-do list application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published