@ivaniuk/tus-server
v1.1.0
Published
Node.js tus server for typescript
Downloads
2
Maintainers
Readme
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)