- Install node package manger (npm)
- Visual studio code (Optional - for viewing database structure)
- SQLite Visual Studio Code Extension (Required if using Vscode to view database);
- Clone repository to desired location
- Change directory into the folder created (i.e andrews-kangah)
- Run
npm install
to install package dependencies - Run
npm run start
to start server
- Change directory to project folder (i.e andrews-kangah)
- Run
npm run test
-
api/v1/register Registers a new drone in the fleet
-
serialNumber
: Serial number of drone e.g DRONE1model
: Drone model e.g Lightweightstate
: Id from DRONE_MODEL TABLE matching of possible states (IDLE, LOADING, LOADED, DELIVERING, DELIVERED, RETURNING)weightLimit
: Maximum carrying weight of dronebatteryPercentage
: Current battery percent of drone
-
POST
-
-
api/v1/load Loads specified medications onto specified drone
-
droneSerialNumber
: Serial number of drone to load e.g DRONE1medicationsNames
: List of medicine names to load onto drone e.g [Penycillin]
-
POST
-
-
api/v1/cargo Returns a list of medications loaded on a specified drone
-
droneSerialNumber
: Serial of number of drone to get loaded medicatioins e.g DRONE1
-
GET
-
-
api/v1/available Returns a list of available drones i.e drones in IDLE/LOADING state
-
droneSerialNumber
: Serial of number of drone to get loaded medicatioins e.g DRONE1
-
GET
-
-
api/v1/battery Returns the current battery percentage of specified drone
-
droneSerialNumber
: Serial of number of drone to get loaded medicatioins e.g DRONE1
-
GET
-