Keep your herokuapp always awakes.
Support Javascript and Typescript
- Node
- Yarn or NPM
$ npm i heroku-awake --save
# OR
$ yarn add heroku-awake
const express = require("express");
const herokuAwake = require("heroku-awake");
const PORT = 3000;
const url = "https://your-app.herokuapp.com";
const app = express();
app.listen(PORT, () => {
// Default application refresh time is 25 mins
herokuAwake(url);
// If you want to change application refresh time
const time = 10;
herokuAwake(url, time);
});
import * as express from "express";
import * as herokuAwake from "heroku-awake";
const PORT = 3000;
const url = "https://your-app.herokuapp.com";
const app = express();
app.listen(PORT, () => {
// Default application refresh time is 25 mins
herokuAwake(url);
// If you want to change application refresh time
const time = 10;
herokuAwake(url, time);
});