Skip to content

JahnaviNalluri/Node-projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

📝 Task Manager API

A RESTful Task Management API built using Node.js, Express.js, MongoDB, and JWT Authentication.

This API allows users to register, login, and manage their tasks securely with pagination and priority-based sorting.


🚀 Features

  • ✅ User Registration & Login
  • ✅ Password Hashing using bcrypt
  • ✅ JWT Authentication
  • ✅ Protected Task Routes
  • ✅ Create, Read, Update, Delete Tasks
  • ✅ Pagination Support
  • ✅ Priority-based Sorting
  • ✅ MongoDB with Mongoose
  • ✅ Environment Configuration using dotenv

🛠 Tech Stack

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose
  • JWT (jsonwebtoken)
  • bcrypt
  • dotenv
  • nodemon

⚙️ Setup Instructions

1️⃣ Clone Repository

git clone <your-repository-link>
cd taskmanagerapi

2️⃣ Install Dependencies

npm install

3️⃣ Create .env File

PORT=5005
URL=your_mongodb_connection_string
JWT_SECRET=your_super_secret_key

📌 API Endpoints

👤 User Routes

Method Endpoint Description
POST /users/register Register a new user
POST /users/login Login user
GET /users Get all users
GET /users/:id Get user by ID
PUT /users/:id Update user
DELETE /users/:id Delete user

📋 Task Routes (Protected)

Method Endpoint Description
POST /tasks Create task
GET /tasks Get all tasks of logged-in user
GET /tasks/:id Get task by ID
PUT /tasks/:id Update task
DELETE /tasks/:id Delete task

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors