REST API for simulated IoT device data
iotsimbackend
is a simple express API server built on a MongoDB database. This repo serves as the backend for the Iced Iot React.js dashboard application.
In the project directory, you can run:
Runs the app in production mode. Open http://localhost:3005 to view data in the browser.
Runs the app with hot module reloading
Script called by Dockerfile for build
Endpoint | Request Type | Description |
---|---|---|
{host}/api/devices/ | GET | Returns all device data points |
These parameters can be used in combination with each other
Parameter | Request Type | Description |
---|---|---|
/facility/<facility ID> |
GET | Returns all device data points in a facility |
/dsn/<serial number> |
GET | Returns all device data points for a device serial number |
/type/<device type> |
GET | Returns all device data points for an IoT device type |
/gte/<epoch date> |
GET | Returns all device data points after specified date |
This codebase can be deployed as a container via docker-compose
docker-compose build
docker-compose up
Open http://localhost:3005 to view data in the browser.