Needed environment variables:
export PORT=3000
export URL='mongodb://:@<server_name>:PORT'
export USER=admin
export PASSWORD=xxx
export SOPHOS_API_KEY='xxx'
export SOPHOS_URL='https://<server_name>:4444/api/'
export TIMER_INTERVAL=5
MongoDB will have 2 collections ApplicationControlRules and TimePeriods Populate the mongodb to have the application control rules from the Sophos API: $ node sync_appcontrolrules.js
to run the timer app: $ node index.js
Timer app has simple web ui in: http://:PORT/time-periods