Get unlimited public & private packages + team-based management with npm Teams.Learn more »

tus-webhook

1.0.2 • Public • Published

tus-webhook

License Pipelines Coverage NPM

Express middleware for parsing tus webhook.

Installation

npm i tus-webhook

Usage

import express, { Express } from "express";
import bodyParser from "body-parser";
 
import { handleTusdHook, Tusd, TusdRequest } from "tus-webhook";
 
const app = express();
app.use(bodyParser.json());
app.post("/hook", handleTusdHook, (req, res) => {
  const { tusd } = req as TusdRequest;
  // Do something with tusd
  res.json({});
});

Install

npm i tus-webhook

DownloadsWeekly Downloads

1

Version

1.0.2

License

Apache-2.0

Unpacked Size

30 kB

Total Files

12

Last publish

Collaborators

  • avatar