{"id":24559257,"url":"https://github.com/parcellab/aws-heartbeat-client","last_synced_at":"2026-04-18T11:07:29.670Z","repository":{"id":27898986,"uuid":"111414400","full_name":"parcelLab/aws-heartbeat-client","owner":"parcelLab","description":"Easy Heartbeat service based on AWS Lambda \u0026 DynamoDB","archived":false,"fork":false,"pushed_at":"2022-11-22T21:03:37.000Z","size":39,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-03-16T19:49:02.415Z","etag":null,"topics":["aws","aws-dynamodb","aws-lambda","heartbeat","team-backend"],"latest_commit_sha":null,"homepage":"https://github.com/parcelLab/aws-heartbeat-server","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parcelLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2017-11-20T13:32:54.000Z","updated_at":"2025-03-01T10:44:18.000Z","dependencies_parsed_at":"2023-01-14T07:42:03.567Z","dependency_job_id":null,"html_url":"https://github.com/parcelLab/aws-heartbeat-client","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/parcelLab/aws-heartbeat-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parcelLab%2Faws-heartbeat-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parcelLab%2Faws-heartbeat-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parcelLab%2Faws-heartbeat-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parcelLab%2Faws-heartbeat-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parcelLab","download_url":"https://codeload.github.com/parcelLab/aws-heartbeat-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parcelLab%2Faws-heartbeat-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002341,"owners_count":26083340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-dynamodb","aws-lambda","heartbeat","team-backend"],"created_at":"2025-01-23T06:16:03.538Z","updated_at":"2025-10-09T23:08:00.625Z","avatar_url":"https://github.com/parcelLab.png","language":"JavaScript","readme":"# AWS Heartbeat (Client)\n\n\u003e Easy Heartbeat service based on AWS Lambda \u0026amp; DynamoDB\n\nFor server see: https://github.com/parcelLab/aws-heartbeat-server\n\n\n# What does this package do?\n\nSends a heartbeat to the aws-heartbeat-server, which you have to set up before.\n\n# Usage\n\nInstall directly from Github using `npm i parcelLab/aws-heartbeat-client --save`.\n\n```javascript\nconst Heartbeat = require('aws-heartbeat-client');\n\nconst baseUrl = 'https://www.your/api/baseUrl';\nconst pulse = 60; // pulse interval in sec - heartbeat max once per pulse interval\nconst heartbeat = new Heartbeat(baseUrl, pulse);\n```\n\n`heartbeat.pulse()` will send a requst to `https://www.your/api/baseUrl/pulse?host=upload\u0026category=ABC\u0026type=XYZ\u0026name=1234`. Hence, you need to know your base url. The base URL is simply the URL you installed your [aws-heartbeat-server](https://github.com/parcelLab/aws-heartbeat-server) to.\n\nThat upserts (updates, or creates if it didn't exist before) an entry in DynamoDB with the query parameters and a timestamp. There are two ways of using that function:\n\n```javascript\n// without callback (fire \u0026 forget)\nheartbeat.pulse(host, category, type, name);\n\n// with callback (to check success)\nheartbeat.pulse(host, category, type, name, function (err, res) {\n  if (err) console.error(err);\n  else console.log('Heartbeat sent');\n});\n```\n\nThe other parameters used in a `pulse` are simply for layers of categories to specify the heartbeat you just sent.\n\n```javascript\nvar host = 'i.e. IP or hostname';\nvar category = 'what kind of heartbeat';\nvar type = 'what kind of workload';\nvar name = 'conrete instance of workload';\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparcellab%2Faws-heartbeat-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparcellab%2Faws-heartbeat-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparcellab%2Faws-heartbeat-client/lists"}