This project is the backend for a Todo List application, designed to manage tasks and user accounts efficiently. It primarily focuses on RESTful API endpoints: api/users
for user operations and api/tasks
for task operations.
- User Registration and Authentication
- CRUD Operations for Tasks
- Task Assignment to Users
- Persistent Storage for Data using MongoDB
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
You need to have the following software installed:
- Node.js and npm (Node Package Manager)
- MongoDB (For the database)
Steps to get your development environment running:
-
Clone the repository:
git clone https://github.com/your_username/todo-list-backend.git
-
Install NPM packages:
npm install
-
Create a .env file in the root directory and add necessary environment variables:
PORT = 5001 CONNECTION_STRING= "your mongo uri here" ACCESS_TOKEN_SECRET="secret code here"
-
Start the server:
npm run dev
POST /api/users/register: Register a new user
POST /api/users/login: Login a user
GET /api/users/current: Retrieve logged in user's information
POST /api/tasks: Create a new task for logged in user
GET /api/tasks: Retrieve all tasks of logged in user
GET /api/tasks/:id : Retrieve a specific task for logged in user
PATCH /api/tasks/:id : Update a specific task of logged in user
PATCH /api/tasks/complete/:id : Mark a specific task of logged in user as complete
DELETE /api/tasks/:id : Delete a specific task of logged in user
- bcrypt
- dotenv
- express
- express-async-handler
- jsonwebtoken
- mongoose
- nodemon