https://github.com/thehxdev/txtban
A server application for serving text content
https://github.com/thehxdev/txtban
golang pastebin
Last synced: 6 months ago
JSON representation
A server application for serving text content
- Host: GitHub
- URL: https://github.com/thehxdev/txtban
- Owner: thehxdev
- License: mit
- Created: 2024-07-12T13:01:10.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-23T20:42:23.000Z (over 1 year ago)
- Last Synced: 2025-01-13T19:37:50.255Z (over 1 year ago)
- Topics: golang, pastebin
- Language: Go
- Homepage:
- Size: 74.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Txtban
Txtban is a server-side application for txt content sharing written in golang.
It does not include a front-end But [tbc](https://github.com/thehxdev/tbc) is a cli client for txtban services.
## Build
To bulid Txtban, you need go compiler, `make` and `sqlite3` installed (sqlite is for running txtban).
```bash
make
```
This will build `tb` executable.
### Docker image
You can build txtban docker image with the following command:
```bash
make docker
```
### Use Docker to build `tb`
If you dont want to install go compiler, you can build the `tb` executable inside golang docker image:
```bash
make docker_exe
```
Then you can see `tb` executable in the project root directory.
## Configuration
Txtban uses [TOML](https://toml.io/en/) file format for it's config file. When you run `tb`,
it will search current working directory and `/etc/txtban` directory to find `config.toml` file.
If you want to specify the `config.toml` file path, use `-c` command-line flag.
See [config.toml](config.toml) file as an example.
## API Endpoints
Here is the full API documentation for txtban (They are like unix commands):
### TODO!