To-Do API is a simple RESTful API built with Node.js and Express. It allows users to manage their to-do tasks.
- Add new to-do items
- Update existing to-do items
- Delete to-do items
- Retrieve all to-do items
- Node.js
- Express
- body-parser
- cors
To set up the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/yemreturker/todo-api.git
-
Navigate to the project directory:
cd todo-api -
Install the dependencies:
npm install
-
Create a .env file in the root directory and add the following environment variables:
PORT=3000
-
Start the application:
npm start
http://localhost:3000
• GET /: Welcome message
• GET /todos: Retrieve all to-do items
• POST /todos: Add a new to-do item
• PUT /todos/:id: Update a to-do item by ID
• DELETE /todos/:id: Delete a to-do item by ID
todo-api/
├── node_modules/
├── src/
│ ├── models/
│ │ └── todo.js
│ ├── routes/
│ │ └── todos.js
│ └── index.js
├── .env
├── package-lock.json
├── package.json
└── README.md
This project is licensed under the MIT License. See the LICENSE file for more details.