1.0.2 • Published 7 years ago
tus-webhook
Licence
Apache-2.0
Version
1.0.2
Deps
2
Size
29 kB
Vulns
0
Weekly
0
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({});
});