- Roo Hastebin: https://h.s8n.workers.dev
Notes:
- You can host this on Cloudflare for free, there is limits to Cloudflare workers but I doubt this will ever hit it.
- 100k Requests per-day
- 1GB Data limit for KV (unless you're storing millions of hastes per-expire date, you'll be fine.)
- Go to your Cloudflae Workers page and sign in.
- Click on the
Workers & Pagestab on the left. - Click on
KVtab belowWorkers & Pagestab. - Click on
Create namespaceon the page, then use the nameHASTESthen pressAdd - Go back to
Workers & Pagestab, then clickCreate application. - Click on
Create workerand enter the name of what you want the site to be called, then scroll down toDeploy - Now open both
Configure WorkerandEdit Codebuttons.
- Click on
SettingsthenVariables - Scroll down to
KV Namespace Bindings - Click on
Add Binding - Set
Variable nametoHASTESand point theKV Namespaceto the one you just created.
- Copy the worker.js file in this repo.
- Paste it into the editor.
- Change the details you want to in the options object at the top of the file.
- After you're done with that now press on
Deployon the top right and your site should be working!
- Create & View Hastes on the site.
- API support
- Stores hastes for 2 weeks (configurable in
worker.jswith theoptions.expireTTLoption, requires it to be in seconds) - API KEYS
API KEY INFO
1) Go to the application's settings tab2) Go to `Variables` then go to `Environment Variables`
3) Create a `Variable` with the name `HASTE_KEYS` with the `value` being any keys you want to be able to create hastes (through the API and Website)
To add more than one key just split the keys by ,
- Example:
key1, key2, key3
- POST:
https://<website_url>/documentswithtext/plainheader and send the string in the body of the request. - GET:
https://<website_url>/documents/:idto get the info
- Encrypt the content being stored.