terminus: Supports graceful shutdown for Node.js app


(terminus)[https://github.com/godaddy/terminus] adds graceful shutdown and Kubernetes readiness / liveness checks for Node.js HTTP application like Express.

🍣 Installation

yarn add @godaddy/terminus # npm install @godaddy/terminus --save

🚌 How to use

Implementing to add terminus is so easy.

const http = require('http');
const app = express();

app.get('/', (req, res) => {
res.send('ok');
});

const server = http.createServer(app);

terminus(server, {
// opts
});

server.listen(3000);

👽 Special Thanks

🖥 Recommended VPS Service

VULTR provides high performance cloud compute environment for you. Vultr has 15 data-centers strategically placed around the globe, you can use a VPS with 512 MB memory for just $ 2.5 / month ($ 0.004 / hour). In addition, Vultr is up to 4 times faster than the competition, so please check it => Check Benchmark Results!!