Alerts

When something important happens in your app, you often want to be notified. For exactly that purpose we have alerts.

When you throw an alert an email will be sent to you with the given message and title.

const kontrl = require("kontrl");

kontrl.alert({
  title: "Reaching the user limit",
  message: "Watch out, we're reaching our user limit!!"
});

Limits

  • Every account is currently limited to 10 alerts per day.
  • Currently only alerts through email is supported. More alert types will be added soon.

Real world example

Say you want to be notified when an item in your stock gets low.

const kontrl = require("kontrl");

setInterval(() => {
  if (//any items are low) {
    kontrl.alert({
      title: "Something is out of stock",
      message: "list the out of stock items..."
    });
  }
});