Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neo-vortex/termbinsharp
A Project aims to replicate termbin.com with REST API with aspnet core.
https://github.com/neo-vortex/termbinsharp
Last synced: 14 days ago
JSON representation
A Project aims to replicate termbin.com with REST API with aspnet core.
- Host: GitHub
- URL: https://github.com/neo-vortex/termbinsharp
- Owner: Neo-vortex
- Created: 2023-09-19T10:41:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-19T11:21:49.000Z (over 1 year ago)
- Last Synced: 2023-09-19T13:26:10.189Z (over 1 year ago)
- Language: C#
- Size: 18.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## TermbinSharp
termbinSharp is a high-performance server application that mimics the functionality of termbin.com. It allows you to host your own private pastebin service for sharing text snippets securely and efficiently. With built-in caching, it provides fast and reliable text sharing.## Features
* Self-Hosted: Run your own pastebin server and have full control over your data and content.* Caching: termbinSharp caches uploaded text snippets, reducing server load and improving response times.
* Secure: Designed with security in mind, ensuring the integrity of shared text.
* SQLITE: Everything is saved and read via SQLITE.* No Duplication: if a data is set before it will return the url for the already set data
*** you can set `useInMemoryDatabase` env variable to force the server to use in memory database, it won't be persistent but won't generate anything on the disk***
## Using the TermbinSharp Server
TermbinSharp provides a straightforward API for uploading and retrieving text snippets. You can interact with the server using HTTP requests. Here's a guide on how to use the TermbinSharp server:### Uploading Text Snippets
To upload a text snippet to the TermbinSharp server, you can make a POST request to the /data/set endpoint. The text snippet should be included in the request body as a JSON string. Here's an example using curl:```
curl -X POST -H "Content-Type: application/json" -d "This is my text snippet" http://your-server-address/data/set
```
Replace http://your-server-address with the actual address where your TermbinSharp server is running. Upon successful upload, the server will respond with a 200 OK status with the corresponding direct url to retrive the data later.### Retrieving Text Snippets
To retrieve a previously uploaded text snippet, you can make a GET request to the / endpoint followed by the snippet's unique identifier (path). For example:```
curl http://your-server-address/abc123
```
Replace abc123 with the actual unique identifier of the text snippet you want to retrieve. If the snippet exists, the server will respond with a 200 OK status and the content of the text snippet in the response body.### docker
you can use docker file to build and run the project