2019-03-04 20:31:52 +01:00
|
|
|
# trackmyd-api
|
|
|
|
|
2019-03-04 20:42:13 +01:00
|
|
|
A simple REST API for trackmyd.
|
2019-03-04 20:31:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
## Architecture
|
|
|
|
<img src="architecture.png" height="150">
|
|
|
|
|
|
|
|
|
|
|
|
## Paths & Operations
|
|
|
|
|
|
|
|
|
|
|
|
| Path | Operation | Description |
|
|
|
|
|------ |----- |----|
|
|
|
|
| /devices | GET | Get devices|
|
|
|
|
| /devices | POST | Add new device |
|
|
|
|
| /devices?id= | GET | Get single device
|
|
|
|
| /devices?id= | PATCH | Update device |
|
|
|
|
| /device?id= | DELETE | Delete device |
|
|
|
|
| /device?name= | GET | Get single device
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
### Step by step
|
|
|
|
|
|
|
|
1. Install **NodeJS** and **NPM**.
|
|
|
|
2. Install **Mongodb**.
|
|
|
|
2. Clone this repository.
|
|
|
|
3. Install dependencies with `npm install`.
|
2019-03-04 20:42:13 +01:00
|
|
|
6. Configure **users** (app.auth.users) basic authentication into `config.json`.
|
2019-03-04 20:31:52 +01:00
|
|
|
7. Configure database (db) into `config.json`.
|
|
|
|
8. Start with `npm start`.
|
|
|
|
|
|
|
|
|
|
|
|
Made with ❤️ by Francesco Esposito ([@frab1t](https://github.com/frab1t))
|