GithubHelp home page GithubHelp logo

bytebin's Introduction

bytebin

stupidly simple "pastebin" service.

it's a "pastebin" in a very simplified sense. effectively, it:

  • accepts (optionally compressed) post requests containing raw content
  • saves the content to disk and caches it in memory
  • returns a key to indicate the location of the content
  • serves content (in a compressed form if the client can handle it) when requested

there's a very minimal HTML frontend for posting content.

the primary intended purpose of bytebin is to act as a middle man in the communication of two separate clients, using payload objects (uploaded to a bytebin instance) as a means to transmit data.

it's also quite good for transferring or sharing large log/plain text files because they're particularly compressible with gzip.

api usage

The API fully supports CORS. wooo ๐ŸŽ‰

reading content

  • content can be read from /{key}.

posting content

  • send a POST request to /post.
  • the request body should contain the content to be uploaded.
  • it is recommended to provide Content-Type and User-Agent headers, but this is not required.
  • ideally, content should be compressed with GZIP before being uploaded. Include the Content-Encoding: gzip header if this is the case.
  • the key is specified in the returned Location header.
  • the response body is a JSON object with only one property, {"key": "{key}"}.

public instances

  • I host a public instance at https://bytebin.lucko.me
  • you can use it in your application as long as:
    • you're not malicious
    • you don't needlessly spam it
    • your usage isn't illegal or going to get me into trouble
    • you provide a User-Agent header uniquely identifying your application
    • if you're planning something likely to be super duper popular or use a lot of data (> 1GB), then please run it past me first

how does it work

bytebin uses:

  • rapidoid as a web server
  • caffeine to cache content & handle rate limits
  • guava for byte stream manipulation
  • gson to read the config

and plain old java for everything else.

is it fast or efficient

well it's written in java, but.. rapidoid is pretty fast, and so is caffeine.

license

MIT, go wild.

bytebin's People

Contributors

lucko avatar

Watchers

 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.