GithubHelp home page GithubHelp logo

l0nn0xr / tus-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from signalapp/tus-server

0.0 0.0 0.0 110 KB

An implementation of the TUS server protocol for resumable uploads

License: GNU Affero General Public License v3.0

TypeScript 100.00%

tus-server's Introduction

Overview

tus-server provides an implementation of the TUS protocol for resumable uploads built on cloudflare workers and R2.

Building

You'll need Node.js. If you use nvm run

nvm use

To install dependencies,

npm install

In order to deploy to cloudflare or use non-local dev mode, use the wrangler utility. Follow those instructions to authenticate with your cloudflare account.

Testing

The server assumes an authentication is provided via a signature using a shared secret. You can provide one for development by setting SHARED_AUTH_SECRET in .dev.vars, e.g.

> cat .dev.vars
SHARED_AUTH_SECRET = "test"

To run a dev server you can interact with over localhost

wrangler dev

To run unit tests,

NODE_OPTIONS=--experimental-vm-modules npm test

Deploying

One time setup

  1. Create an R2 bucket and update the binding in wrangler.toml
  2. Add a base64 encoded shared auth secret with wrangler secret put SHARED_AUTH_SECRET
wrangler deploy -e <staging|production>

License

Copyright 2023 Signal Messenger, LLC

Licensed under the AGPLv3

tus-server's People

Contributors

ravi-signal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.