/doit

Training project to develop a TODO CRUD API

Primary LanguageJavaScript

This is a training project to develop a TODO CRUD API

Requirement

Generate a TODO CRUD application with the following endpoints and extra challenging activities. The goal is to practice on develop an API http in a collaborative environment and the tools used in the current project.

TODO Fields

  • name: string
  • is_completed: Boolean
  • created_at: DateTime

Endpoints required

  • List all the TODOs and with pagination
  • Get a TODO by Id
  • Logical delete a TODO by id
  • Save a TODO
  • Complete a TODO

Technical requirements

  • Avoid when possible the usage of Merge and use Rebase
  • Code Coverage > 75%
  • Store the TODO in a MongoDB database
  • Document a Readme.MD with instructions to setup the project, run it and run tests
  • Document a CONTRIBUTION.md with instructions on how to contribute to the project

Extra challenges

  • Enable JavaScript linter
  • Code coverage > 95 %
  • Code structure and organization
  • API documentation in Markdown
  • Add updated_on fields on the TODO

How to

Install the project

npm install

Run the project

npm start

Run the tests

npm run test

Coverage

Calculate

npm test -- --coverage

View

[PATH TO PROJECT]/coverage/lcov-report/index.html

[PATH TO PRoJECT]/coverage/clover.xml

[PATH TO PROJECT]/coverage/coverage-final.json

ESLint

run eslint

npm run lint

fix errors and warnings

npm run lint -- --fix