This repository has writen by node.js code.
The repository manages a database of Covid-19 patients.
The database storges details of patients, people the patients met, thier covid-tests and status statistics.
- Clone the repository
- Download and install API development environment such as Poasman or Swagger
- Download and install Node.js
- Install NPM on the command line
$npm install -g npm
- Verify installation and version on the command line
$node -v
and also
$npm -v
- Install Express-feature on the command line
$npm install express
$npm install express-validator
For running tests install dev dependencies
Install on the command line Mocha-Chai-feature
$npm install mocha chai
$npm install chai-http
- Install SuperTest-feature on the command line
$npm install supertest
enter the following:
$npm run test
- Navigate to the repository folder
- Run on the command line for starting a server
$node .
The server should return the message
listening on port 3000
- By using the API send requests to the data base \
- Send rest request to
http://localhost:3000/
Post
patients/potential/{potentialPatientId}
labtests
Get
patients
patients/{id}/route
patients/{id}/encounters
patients/{id}/full
patients/new?since=[VALUE]
patients/potential
patients/isolated
statistics
Put
patients
patients/{id}/route
patients/{id}/encounters
This project is under the MIT license
send rest request to this link http://ruppin2022.herokuapp.com