edit user ref

This commit is contained in:
Francesco Esposito 2019-07-23 21:03:14 +02:00
parent 30373407c6
commit b21d9de9ac
2 changed files with 19 additions and 22 deletions

View File

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

View File

@ -9,14 +9,14 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/frab1t/trackmyd-api.git" "url": "git+https://github.com/frsposito/trackmyd-api.git"
}, },
"author": "frab1t", "author": "frsposito",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"bugs": { "bugs": {
"url": "https://github.com/frab1t/trackmyd-api/issues" "url": "https://github.com/frsposito/trackmyd-api/issues"
}, },
"homepage": "https://github.com/frab1t/trackmyd-api#readme", "homepage": "https://github.com/frsposito/trackmyd-api#readme",
"devDependencies": { "devDependencies": {
"eslint": "^5.14.1", "eslint": "^5.14.1",
"eslint-config-airbnb-base": "^13.1.0", "eslint-config-airbnb-base": "^13.1.0",