Giter Site home page Giter Site logo

bytebin's Introduction

About

An application that temporarily stores data as byte arrays.

All data is stored as a byte array. To store additional information about bin, json meta-files are used. The application implements a mechanism to clean up files with expired lifetime or missing bin/meta part.

Usage

To work with the app, you can use the following endpoints:

  • POST /bin - create a bin. The body should contain the binary data that will be saved. It is also important to specify the Content-Type header. If it is not specified, bytebin will try to determine it automatically. If this is not possible, application/octet-stream will be used. A unique id will be returned as a response.

  • GET /bin/{id} - get bin by id. The response will be returned as a byte array and a Content-Type header associated with this bin.

Installation

Docker

We suggest you deploy your own bytebin using Docker.

The first step is to clone the project:

git clone https://github.com/orewaee/bytebin.git
cd bytebin

After downloading, take a look at the deploy/compose.yaml file. You can customize the Docker Compose config to your liking, or you can start running it right away.

To run bytebin use the following command:

docker compose -f ./deploy/compose.yaml -p bytebin up -d

Or a sh script:

sh scripts/compose.sh

Binary

This variant requires pre-building the project for your system.

To do this, as with Docker, you must clone the repository and navigate to the project directory. After that, you need to build the project into a single binary using the command below:

go build -o bytebin -v cmd/bytebin/main.go

If necessary, change the GOOS environment variable to get a binary that is compatible with your system.

You can then use the config/example.yaml configuration file to configure bytebin. If no configuration file is specified at startup, environment variables will be used.

The startup command:

./bytebin --config=config/example.yaml

bytebin's People

Contributors

orewaee avatar

Watchers

 avatar  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.