x/heroku_awakener@v1.0.4

Keep Heroku apps awake in Deno
Latest

☁️💤 Heroku awakener

deno land GitHub release CI

Deno port of heroku-keep-awake

Getting started

import { wakeDyno, wakeDynos } from "https://deno.land/x/heroku_awakener/mod.ts";

const url = 'https://seoul-tracker.herokuapp.com/'
wakeDyno(url, {
  interval: 10 // 10 minutes
});

const urls = ['https://kaffeine.herokuapp.com/', 'https://swapi-trybe.herokuapp.com/'] 
wakeDynos(urls, {
  interval: 29,
  stopTimes: {
    start: '6:00', // 6AM
    end: '13:00' // 13PM
  }
});

CLI

Alternatively, you can use it directly from the CLI by using deno run:

# Single heroku app
deno run --allow-net https://deno.land/x/heroku_awakener/cli.ts --url <url> --interval <interval> --stopStart <start> --stopEnd <end>

# Multiple heroku apps (separate urls with comma eg. https://swapi-trybe.herokuapp.com/,https://kaffeine.herokuapp.com/)
deno run --allow-net https://deno.land/x/heroku_awakener/cli.ts --urls <urls> --interval <interval> --stopStart <start> --stopEnd <end>

You can also install it globally using the following:

deno install --allow-net -n heroku-awakener https://deno.land/x/heroku_awakener/cli.ts

Then, the package is available to run:

heroku-awakener --url|--urls <urls|urls> --interval <interval> --stopStart <start> --stopEnd <end>

Configuration

Required permissions:

  1. --allow-net

Development

Run tests:

deno test --allow-net