To monitor the online state of devices the Heartbeat-Client needs to be installed on the respective machine. It continuously sends notifications to the Heartbeat-Server.
A full integration can be set up using the Local Development Environment.
Copy .env.example to .env and adjust values.
install dependencies
npm i
start app
npm start
pull image
docker pull luisnaldo7/heartbeat-client:latest
or build image
docker build -t luisnaldo7/heartbeat-client:latest -f docker/Dockerfile .
execute container
docker run -d -e HEARTBEAT_CLIENT_ID="device-id" -e HEARTBEAT_SERVER_BASE_URL="http://localhost:3000" --rm --name heartbeat-client luisnaldo7/heartbeat-client:latest
execute container on boot
docker run -d -e HEARTBEAT_CLIENT_ID="device-id" -e HEARTBEAT_SERVER_BASE_URL="http://localhost:3000" --restart always --name heartbeat-client luisnaldo7/heartbeat-client:latest