https://github.com/leeandri/nod3js-usertask-api
RESTful API built or managing users and task
https://github.com/leeandri/nod3js-usertask-api
express-js file-upload jwt mongodb mongoose node-js nodemailer postman
Last synced: 3 months ago
JSON representation
RESTful API built or managing users and task
- Host: GitHub
- URL: https://github.com/leeandri/nod3js-usertask-api
- Owner: leeandri
- Created: 2025-03-27T17:03:30.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-04-01T14:08:04.000Z (12 months ago)
- Last Synced: 2025-04-01T15:28:47.053Z (12 months ago)
- Topics: express-js, file-upload, jwt, mongodb, mongoose, node-js, nodemailer, postman
- Language: JavaScript
- Homepage: https://nod3js-usertask-api.onrender.com/
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# User Task API
A RESTful API built with Node.js for managing users and tasks. This API supports operations such as creating, reading, updating, and deleting users and tasks.
## Tech Stack
- **Backend**: Node.js, Express.js
- **Database**: MongoDB (Atlas), Mongoose
- **Authentication**: JSON Web Tokens (JWT)
- **File Upload**: Multer, Sharp
- **Deployment**: Render
## API Endpoints
### Users
- **POST `/users`**: Register a new user
- **POST `/users/login`**: Log in a user
- **POST `/users/logout`**: Log out the current session
- **POST `/users/logoutAll`**: Log out all sessions
- **GET `/users/me`**: Fetch the current user's profile
- **PATCH `/users/me`**: Update user profile
- **DELETE `/users/me`**: Delete user account
- **POST `/users/me/avatar`**: Upload profile picture
_To upload an image, use `form-data` with key `avatar` (type: File)_
- **DELETE `/users/me/avatar`**: Delete profile picture
- **GET `/users/:id/avatar`**: View user profile picture
### Tasks
- **POST `/tasks`**: Create a new task
- **GET `/tasks`**: Fetch all tasks
- **GET `/tasks/:id`**: Fetch a task by ID
- **PATCH `/tasks/:id`**: Update a task by ID
- **DELETE `/tasks/:id`**: Delete a task by ID
## Getting Started
1. Clone the repository: `git clone `
2. Install dependencies: `npm install`
3. Start the server: `npm run start`
4. API available at: `https://nod3js-usertask-api.onrender.com`
---