express API for multi-user to-do list application
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
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
npm run dev
POST - Register process for user
http://localhost:5000/api/auth/register
POST - Login process for user
http://localhost:5000/api/auth/login
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
GET - Show a todo with todo's id
http://localhost:5000/api/todo/show/:id
http://localhost:5000/api/todo/all
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