https://github.com/xmk-dev/heroku-caffeine
keeps your Heroku dynos awake ☕️
https://github.com/xmk-dev/heroku-caffeine
heroku javascript nodejs npm npm-package package
Last synced: 12 months ago
JSON representation
keeps your Heroku dynos awake ☕️
- Host: GitHub
- URL: https://github.com/xmk-dev/heroku-caffeine
- Owner: xmk-dev
- License: mit
- Created: 2019-12-18T13:15:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-21T14:58:37.000Z (about 2 years ago)
- Last Synced: 2025-04-12T01:07:58.032Z (12 months ago)
- Topics: heroku, javascript, nodejs, npm, npm-package, package
- Language: JavaScript
- Homepage:
- Size: 1.94 MB
- Stars: 7
- Watchers: 2
- Forks: 4
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Heroku Caffeine
Heroku Caffeine ☕️ keeps your Heroku dynos awake by perodically sending HTTP requests to your apps.
## Features ✨
- Sends HTTP requests to all specified urls (apps) in specified interval
- Emits events
## Event Types
- _init_ - object is properly created. Contains HerokuCaffeine (this) object.
- _pinging_ - starting sending requests. Contains list of urls to ping.
- _pinged_ - sent request to the certain app. Contains pinged url.
- _pingedall_ - all urls are pinged. Contains lis of pinged urls.
- _endedpinginginterval_ - interval has ended. Waiting for another interval. Contains results from pinging the urls.
- _error_ - error has occurred, e.g. list of urls is not valid
- _warn_ - warning (doesn't terminate the app), e.g. one of the urls in the list is invalid
## Installation
```sh
$ npm i -S heroku-caffeine
```
## Usage
```
const HerokuCaffeine = require('heroku-caffeine');
const herokuCaffeine = new HerokuCaffeine({ urls: ['https://your-heroku-app.herokuapp.com'] });
herokuCaffeine.run();
```
## Development
Want to contribute? Great! 🔥
If you want you could follow this commit messages [guide](https://gitmoji.carloscuesta.me/).
#### Install:
```sh
$ cd heroku-caffeine
$ npm i
```
#### Run:
```sh
$ npm run dev
```
#### Test Coverage:
```sh
$ npm run test-coverage
```
#### Lint Fix:
```sh
$ npm run lint-fix
```
and many other helpful scripts available in package.json 🤓