Welcome to the Task Management API project!. This API provides functionality for managing tasks with user authentication using JSON web tokens.
- Features
- Getting Started
- Configuration
- Database Setup
- Usage
- API Endpoints
- Authentication
- Contributing
- License
- User authentication
- Task CRUD operations
- MVC architecture
- MySQL database
- Node.js (v12 or higher)
- npm or yarn
- MySQL
- Clone the repository:
git clone https://github.com/sethdanny/task_management.git
- Install dependencies: cd task_management npm install
- Create a .env file in the root directory and set the following variables:
- PORT=5000
- DB_HOST=localhost
- DB_USER=your_database_user
- DB_PASSWORD=your_database_password
- DB_NAME=task_manager
- Ensure that your MySQL server is running.
- Run the following commands to set up the database and tables:
npm run db:create
npm run db:migrate
- Start the server: npm run server
- Access the API at
http://localhost:5000
- GET /tasks: Get all tasks for a user.
- GET /tasks/:taskId: Get a specific task for a user.
- POST /tasks: Add a new task for a user.
- PUT /tasks/:taskId: Update a task for a user.
- DELETE /tasks/:taskId: Delete a task for a user.
- The API uses JSON Web Tokens (JWT) for user authentication.
- Register a new user using the /register endpoint.
- Obtain a JWT token by logging in with the /login endpoint.
- Include the obtained token in the Authorization header for protected endpoints.
Nadduli Daniel naddulidaniel1994@gmail.com
https://documenter.getpostman.com/view/27746757/2s9YeLZVUL
- This project is licensed under the MIT License