tsq / webhooksha256

A expressjs middleware for handling Github webhook using X-Hub-Signature-256 header

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

github-webhook-sha256

A expressjs middleware for handling Github webhook using X-Hub-Signature-256 header.

Install

yarn add webhooksha256

Usage

const express = require('express');
const webhooksha256 = require('webhooksha256');

const key = 'YOUR KEY';
const app = express();

app.use(express.json());
app.use(express.urlencoded({ extended: true }));

app.get('/deploy', webhooksha256(key), (req, res) => {
    // you will be here if the verifying is OK!
});

About

A expressjs middleware for handling Github webhook using X-Hub-Signature-256 header

License:MIT License


Languages

Language:JavaScript 100.0%