- OAuth 2.0
- Freeboard
- Express 4
- Mongoose
Using nodemon / node
APPENV=dev.local IOT_CONNECTIONSTR=AZURE_IOTHUB_OWNER_CONNECTIONSTRING nodemon app.js
Using pm2
APPENV=production pm2 start app.js --name gallon-dashboard
You can omit these variables by replacing their references inside the configuration file.
-
APPENV
environment variable is used to identify configuration file which is being used by the app. The possible values aredev.local
,local
, orproduction
. -
IOT_CONNECTIONSTR
is an IoT hub owner connection string. The value can be obtained from Azure Portal.
Before creating user or client app, go to tools/bootstrap
directory.
- Creating User
node add-user.js USERNAME FULLNAME EMAIL PASSWORD ROLE
- Creating Client App
node add-oauthclient.js APPNAME USERNAME