Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/bpedro/express-glitch-keepalive
- Owner: bpedro
- License: mit
- Created: 2018-05-23T16:37:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-25T15:08:09.000Z (over 6 years ago)
- Last Synced: 2024-12-28T05:12:29.224Z (28 days ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/express-glitch-keepalive
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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');
});
```
## ConfigurationKeepalive 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`.