Skip to content

Commit

Permalink
Merge pull request #229 from appsignal/add-heartbeat-checkins-nodejs
Browse files Browse the repository at this point in the history
Add heartbeat check-ins `express-redis` endpoint
  • Loading branch information
unflxw authored Sep 16, 2024
2 parents b6269da + f9199dc commit c8b50a2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions nodejs/express-redis/app/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ app.get("/cron", async (req, res) => {
res.send("Cron check-in sent!")
})

app.get("/heartbeat", async (req, res) => {
checkIn.heartbeat("custom-heartbeat-checkin")

res.send("Heartbeat check-in sent!")
})

checkIn.heartbeat("continuous-heartbeat-checkin", {continuous: true})

app.get("/fetch", async (req, res, next) => {
try {
const response = await fetch("https://google.com")
Expand Down

0 comments on commit c8b50a2

Please sign in to comment.