https://github.com/sandeepguptax2003/charitism-todo
https://github.com/sandeepguptax2003/charitism-todo
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sandeepguptax2003/charitism-todo
- Owner: sandeepguptax2003
- Created: 2024-01-02T09:58:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-03T15:59:03.000Z (over 1 year ago)
- Last Synced: 2025-02-01T22:47:55.178Z (4 months ago)
- Language: JavaScript
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node.js Express TODO API
This is a simple Node.js application with Express that provides a CRUD API for managing TODOs. The application uses MongoDB as a database and includes JWT-based authentication for user signup and login.
## Getting Started
- **Prerequisites:**
- Ensure Node.js and MongoDB are installed and running.
- Create a `.env` file with required configurations.- **Installation:**
- Clone the repository, install dependencies, and start the server.
- **Command:**
```bash
git clone https://github.com/yourusername/express-mongo-todo-api.git
cd express-mongo-todo-api
npm install
npm start
```## Features
### 1. User Authentication
- **Signup:**
- Create a new user account by providing a unique username and password.
- **Endpoint:** `/user/signup`
- **Method:** `POST`- **Login:**
- Authenticate and obtain a JWT token for accessing protected routes.
- **Endpoint:** `/user/login`
- **Method:** `POST`### 2. TODO Management
- **Create TODO:**
- Add a new task to your list.
- **Endpoint:** `/todo`
- **Method:** `POST`
- **Authorization:** Token- **Get All TODOs:**
- Retrieve a list of all tasks.
- **Endpoint:** `/todo`
- **Method:** `GET`- **Update TODO:**
- Modify an existing task's details.
- **Endpoint:** `/todo/:id`
- **Method:** `PUT`
- **Authorization:** Token- **Delete TODO:**
- Remove a task from your list.
- **Endpoint:** `/todo/:id`
- **Method:** `DELETE`
- **Authorization:** Token