Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/absolucy/sweetpaste
A sweet n' simple pastebin with syntax highlighting and no client-side code!
https://github.com/absolucy/sweetpaste
Last synced: about 1 month ago
JSON representation
A sweet n' simple pastebin with syntax highlighting and no client-side code!
- Host: GitHub
- URL: https://github.com/absolucy/sweetpaste
- Owner: Absolucy
- License: mpl-2.0
- Created: 2021-08-16T08:26:39.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-21T03:20:40.000Z (about 2 years ago)
- Last Synced: 2024-11-19T12:58:08.725Z (about 2 months ago)
- Language: Rust
- Homepage:
- Size: 37.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# sweetpaste
sweetpaste is a sweet n' simple pastebin server. It's completely server-side, with *zero* client-side code.
## Configuration
The configuration will be loaded from a file named `config.toml` in the working directory.
| Config Option | Description | Default |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------- |
| `address` | The address to bind to. | `127.0.0.1:8080` |
| `site-url` | The base URL of the site to bind to. Should *not* contain a trailing slash! | `http://127.0.0.1:8080` |
| `public` | Whether this instance is public or not. If this is false, the password is needed to submit pastes. | `false` |
| `static-dir` | The directory to serve static files from. These take priority over pastes! | None |
| `paste-limit` | The maximum size, in bytes, of a single paste. | 8 MB |
| `cache-limit` | The maximum size, in bytes, of the in-memory cache, used to avoid re-rendering pastes. | 64 MB |
| `db-path` | The path to the SQLite database file. | `sweetpaste.db` |
| `password` | A password, used for uploading on non-public instances, and deleting *any* paste. | `secret` |
| `id-key` | The 32-byte encryption key used to encrypt the paste ID. sweetpaste will *refuse to start* if this is all zeroes! | `0000...` |
| `trusted-ips` | A list of IP addresses which will be trusted to provide `X-Real-IP`/`X-Forwarded-For` headers | `["127.0.0.1", "::1"]` |
| `syntax-highlighting.theme` | The theme to use for syntax highlighting | `base16-eighties.dark` |
| `syntax-highlighting.themes-folder` | The folder to load `.tmTheme` files from | None |
| `syntax-highlighting.syntax-folder` | The folder to load `.tmLanguage` files from | None |## License
All code is licensed under the [MPLv2 License](LICENSE.md).
### Amendment
I, @Absolucy, fully give permission for any of my code (including the entirety of this project, sweetpaste), anywhere, no matter the license, to be used to train machine learning models intended to be used for general-purpose programming or code analysis.