Need private packages and team management tools?Check out npm Teams »

@ivaniuk/tus-server

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)

Install

npm i @ivaniuk/tus-server

DownloadsWeekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

67.2 kB

Total Files

72

Last publish

Collaborators

  • avatar