Skip to main content

Get started

  1. Download the starter project.

  2. Run a dry run command.

  3. Run a deploy command and get started.

Download the starter project

Use the obviouus CLI to create a starter project:

npx create-obviouus@latest my-obviouus-collection

Install the project dependencies:

yarn install

Run a dry run command

yarn cli dry-run

The dry run command will detect that an email is required. It will prompt you to enter an email address.

Please enter the email:

check.ts
import { registerScheduler, Frequency } from "obviouus-cli";

registerScheduler({
cron: Frequency.EVERY_DAY,
checks: [
{
alertChannel: {
channelType: "slack",
channel: "{channelId}",
},
request: {
requestType: "http-request",
props: {
url: `https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd`,
method: "GET",
},
},
run: ({ status, data }) => {
const statusCheck = status === 200;
if (statusCheck) {
return [
{
status: "success",
message: "API call was successful",
},
];
} else {
return [
{
status: "failed",
message: "API call failed",
},
];
}
},
},
],
});