express-glitch-keepalive

0.2.0 • Public • Published

express-glitch-keepalive

An Express middleware that keeps your Glitch project alive.

Inspired by koa-glitch-keepalive.

Installation

npm i --save express express-glitch-keepalive

Usage

const express = require('express');
const keepalive = require('express-glitch-keepalive');
 
const app = express();
 
app.use(keepalive);
 
app.get('/', (req, res) => {
  res.json('Ok');
});

Configuration

Keepalive can be configured in a number of ways:

  • The request path to use defaults to /_keepalive but can be changed with the environment variable KEEPALIVE_PATH.
  • The delay between keepalive requests defaults to 3 minutes but can be changed with the environment variable KEEPALIVE_MINUTES.

Dependents (0)

Package Sidebar

Install

npm i express-glitch-keepalive

Weekly Downloads

3

Version

0.2.0

License

MIT

Unpacked Size

3.66 kB

Total Files

6

Last publish

Collaborators

  • bpedro