About 3 min

Next.js install

Copy the code below into your app and send pings on the monitor interval.

Install steps

  1. 1

    Prepare the ping URL

    Put the URL from your dashboard into the `VIBEPULSE_PING_URL` environment variable.

  2. 2

    Paste the code

    Add the code below to your main loop or server startup.

  3. 3

    Match the interval

    Set the sleep/interval in code to match your monitor check interval.

  4. 4

    Deploy and verify

    After deploy, check that the last ping time updates on the dashboard.

Code

Next.js install
// instrumentation.ts — runs while the Next.js server is up
export async function register() {
  if (process.env.NEXT_RUNTIME !== 'nodejs') return;

  const pingUrl = process.env.VIBEPULSE_PING_URL;
  if (!pingUrl) return;

  const INTERVAL_MS = 600_000; // match your monitor interval

  setInterval(async () => {
    const res = await fetch(pingUrl);
    if (!res.ok) console.error('vibePulse ping failed', res.status);
  }, INTERVAL_MS);
}