This is an express.js app that can communicate with AWS Thing Shadows for our in-house telemeatics units. There is also a front-end app that allows commands to be sent to these devices.
- Clone this repo
- Create a .env file with the following
aws_access_key_id = <aws_access_key_id>
aws_secret_access_key = <aws_secret_access_key>
region = <aws_region>
endpoint = <aws_thing_shadow_api_endpoint>
- Run
npm install
- Run
npm start
to run the app ornpm run dev
to run it with nodemon which will start the server again when documents are saved - To visitthe management console, visit http://127.0.0.1:2080/shadows/manage
GET: /shadows
: returns a list of Thing Shadows that can be accessed via the url in the .env fileGET: /shadows/manage
: returns the web app for sending commands to shadowsGET: /shadows/:thingName
: returns the current shadow of the Thing with the given namePUT: /shadows/:thingName/:action
: executes that given action on the given Thing. The list of actions can be found in thetelemActions.js
file.