Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bpedro/express-glitch-keepalive

An Express middleware that keeps your Glitch project alive
https://github.com/bpedro/express-glitch-keepalive

Last synced: 24 days ago
JSON representation

An Express middleware that keeps your Glitch project alive

Awesome Lists containing this project

README

        

# express-glitch-keepalive

An [Express](http://expressjs.com/) middleware that keeps your [Glitch](https://glitch.com/) project alive.

Inspired by [koa-glitch-keepalive](https://github.com/matzkoh/koa-glitch-keepalive).

## Installation

`npm i --save express express-glitch-keepalive`

## Usage

```js
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`.