Skip to content

Commit

Permalink
merge pull request #10 from orewaee/docs
Browse files Browse the repository at this point in the history
  • Loading branch information
orewaee authored Aug 25, 2024
2 parents e9d4ab2 + 5339319 commit 5d89101
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
changelog:
categories:
- title: "✨ Features"
labels:
- feat
- title: "🐞 Fixes"
labels:
- fix
- bug
- title: "Refactoring"
labels:
- refactor
- title: "📄 Docs"
labels:
- docs
- title: "Other"
labels:
- "*"
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

Expand All @@ -11,7 +15,7 @@ To work with the app, you can use the following endpoints:
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.
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.
Expand All @@ -20,6 +24,8 @@ To work with the app, you can use the following endpoints:

## Installation

### Docker

We suggest you deploy your own bytebin using Docker.

The first step is to clone the project:
Expand All @@ -43,3 +49,25 @@ Or a `sh` script:
```bash
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:

```bash
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:

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

0 comments on commit 5d89101

Please sign in to comment.