Welcome to the Todo List API project! This is an API for managing your to-do tasks.
-
Make sure you have Node.js and npm installed on your computer.
-
Clone this repository to your computer:
git clone https://github.com/LordLovelysmell/todo-list-api.git
- Install the dependencies:
npm install
-
Create a
config.env
file in the root folder of the project. -
In the
config.env
file, specify the required environment variables. Example is inexample.env
and you can freely copy it toconfig.env
.
To using this option you need Docker to be installed on your computer.
- Start the application in development mode using following command:
docker-compose up -d --build
To using this option you need MongoDB installed on your computer, otherwise the app will not work.
- Start the application using following command:
npm start
There is a Postman Collection v2.1 for Postman.
Just import file named api.postman_collection.json
located in root directory of the project to Postman (File -> Import).
You will also need to import environment for Postman to effectively interact with Todo List API. The environment is also in the project root.
The Postman collection completely mirroring all wokrkable endpoints.
Images loaded using /api/v1/todos/64f18bf743e197ab2f780cd8/attachments
endpoint are served at /img/todos/IMAGE_FILENAME
.
IMAGE_FILENAME
is returned by endpoint above as filename
property if loading was successful.
- Run tests:
npm test
- Run tests with coverage report:
npm run test:coverage