Welcome to My REST-API! This API is designed to provide a seamless experience for users who love to manage tasks efficiently.
- Node.js
- Express.js
- MongoDB
- Mongoose
- JSON Web Token (JWT)
- bcrypt
- resend
- sharp
- Multer
- Jest
- User Authentication: Allow users to sign up and log in.
- Profile Management: Users can update their profile details and change their password.
- Task Management: Implement CRUD operations for tasks, including marking tasks as completed.
- File Upload: Allow users to upload a profile picture/avatar.
- Email Service: Send welcome and cancellation emails to users.
- Testing: Write tests for critical functionalities.
- Documentation: Provide setup instructions and API documentation.
This concise list captures the main features of your app in a clear and easy-to-understand format.
Follow these steps to set up your local environment for the Natours app:
-
Clone the Repository: Clone this repository to your local machine:
git clone https://github.com/alin00r/Task-Manager-API.git cd Task-Manager-API
-
Install Dependencies: Run the following command to install all the required dependencies:
npm install
-
Configure Environment Variables:
Before you can run the Task-Manager-API app, you need to set up your environment variables. These variables store sensitive information required for the app to function properly. Follow these steps to configure your environment variables:
-
Create a
.env
File: In the root directory of the app, create a file named.env
. -
Add the Following Environment Variables: Replace the placeholders with your actual information. You might need to sign up for accounts and services to obtain the required credentials.
# MongoDB Configuration MONGO_URI_ATLAS=your-mongodb-database-url # JSON Web Token Configuration JWT_SECRET=your-json-web-token-secret
-
POST
/users/signup
POST
/users/login
POST
/users/logout
POST
/users/logoutAll
GET
/users/me
DELETE
/users/me
PATCH
/users/me
GET
/users/:id/avatar
POST
/upload/me/avatar
DELETE
/upload/me/avatar
POST
/task
GET
/tasks
GET
/tasks/:id
PATCH
/tasks/:id
DELETE
/tasks/:id
During API development, I use Postman
for handling/testing all endpoints.
-
Postman collection/documentation is available on this link click here
-
Base URL endpoints:
http://127.0.0.1:3000/
orhttp://localhost:3000/