Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elc0mpa/gateways-peripherals-be
https://github.com/elc0mpa/gateways-peripherals-be
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/elc0mpa/gateways-peripherals-be
- Owner: elC0mpa
- License: mit
- Created: 2022-07-17T23:56:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-01T04:07:06.000Z (over 2 years ago)
- Last Synced: 2023-03-03T19:27:11.326Z (over 1 year ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gateways-peripherals-BE
This is a simple CRUD project which works with two entites:
- Gateways
- Peripherals## Gateways:
### Model:
- Serial Number: String unique and required
- Label: String required
- Addres: String required which must be validated as a valid IP address
- Peripherals: [ObjectId] Associated peripherals to this gateway### Endpoints:
- get(/gateway) -> returns all gateways
- get(/gateway/:id) -> return details for a specific gateway
- post(/gateway) -> creates a new gateway || serialNumber, label and address fields received in body
- delete(/gateway/:id) -> deletes a gateway## Peripherals:
### Model:
- Gateway: ObjectId required, gateway to which this periperal is associated
- UID: Number required
- Vendor: String required
- CreatedAt: Date
- Status: Boolean### Endpoints:
- get(/peripheral) -> returns all peripherals
- get(/peripheral/:id) -> return details for a specific peripheral
- post(/peripheral) -> creates a new peripheral || gateway, uid, vendor and status fields received in body
- delete(/peripheral/:id) -> deletes a peripheral## Environment Variables
- MONGO_URL: specify connection URL to the mongo database