tus-webhook
v1.0.2
Published
Express middleware for parsing tus webhook.
Downloads
12
Readme
tus-webhook
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({});
});