Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 1.36 KB

File metadata and controls

45 lines (27 loc) · 1.36 KB

Prescriptions API

An RESTful API for the iClinic Challenge

This is the repository for the iClinic challenge based on https://github.com/iclinic/iclinic-node-challenge.

How to use

Node

  • Make sure you have Node.js installed (this API was built in node v10.16.2)

MongoDB

API

  • Install the node packages by running this command: npm i
  • To start the API :
    • Run the command npm run start:watch to run on project root folder ( uses nodemon to run, recommended)
    • or npm run start:watch on project root folder to use vanilla Node.
  • By default the API will run on the port difined in process.env.PORT or 3000.
  • The url for the POST method is HOST:PORT/v2/prescriptions (i.e: localhost:3000/v2/prescriptions)

Automated Tests:

  • The automated tests were written using jest and supertest. To run them: :
    • Run command npm run test on the project root folder

JSDocs

  • The package docnator was used to assemble the JSDocs in the \docs folder

Atenciosamente,

Ederson Sparenberger.