Update readme

This commit is contained in:
Vikas
2024-06-02 23:11:19 +05:30
parent 1fdae1c839
commit 0096d43827

View File

@@ -10,29 +10,50 @@ PastePass is a single-binary, no dependency, fast and lightweight web service wr
### How to use
#### Download
Download the binary from the [releases](https://github.com/v1k45/pastepass/releases) page or build it from source:
```bash
git clone https://github.com/v1k45/pastepass.git
cd pastepass
make setup
make build
```
The binary will be created in the `bin/` directory. If you are downloading the binary, make sure to make it executable:
```bash
chmod +x pastepass-linux-amd64
```
#### Run
```bash
Run with default options:
```bash
./pastepass
```
Open http://localhost:8008/ to access the web app. Use the `-h` option to find all options:
Open http://localhost:8008/ to access the web app.
Use the `-h` option to find all options:
```bash
./pastepass -h
```
Usage:
```
Usage of ./pastepass:
-app-name string
The name of the application (e.g. ACME PastePass) (default "PastePass")
-db-path string
The path to the database file (default "pastes.boltdb")
-reset-db
Reset the database on startup
-server-addr string
The server address to listen on (default ":8008")
```
#### Options
| Option | Description | Default |
|--------------|----------------------------------------------------------------------------|----------------|
| -app-name | The name to display in the nav to ensure you are on the right environment. | PastePass |
| -db-path | The path of the database file | pastepass.db |
| -reset-db | Delete all pastes before starting the server | `false` |
| -server-addr | The server address to listen to | `:8008` |
| -h | Show help message | |
### Motivation
@@ -48,6 +69,8 @@ The pastes are encrypted with AES-256-GCM. The encryption key for each paste is
The server does not log any information about the pastes. The only information stored is the encrypted paste and its metadata (e.g. expiration time).
PastePass is only intended to be used as a self-hosted service, not a public paste bin.
> [!CAUTION]
> The server does not enforce HTTPS for the endpoints, but it is absolutely necessary to use HTTPS for all requests when deploying this service in production.