@ivaniuk/tus-server
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Tus node server with types and hooks

credits https://github.com/tus/tus-node-server

With express

import {TusServer, FileStore} from '@ivaniuk/tus-server';
import * as express from 'express';

const app = express();
const server = new TusServer<express.Request>({
    dataStore: new FileStore<express.Request>({
        directory: '/tmp/tus',
        expiration: 3600, // 1 hour
    }),
    maxSize: 50 * 1024 * 1024, // 50 MB
});

app.all('/uploads', server.handle)

Package Sidebar

Install

npm i @ivaniuk/tus-server

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

67.2 kB

Total Files

72

Last publish

Collaborators

  • igorivaniuk