{"id":22489114,"url":"https://github.com/JLCarveth/nutty","last_synced_at":"2025-08-02T21:32:11.767Z","repository":{"id":196164677,"uuid":"614059782","full_name":"JLCarveth/nutty","owner":"JLCarveth","description":"A very simple HTTP server, and a paste server implementation.","archived":false,"fork":false,"pushed_at":"2024-05-21T14:40:44.000Z","size":141,"stargazers_count":59,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-06T21:43:21.205Z","etag":null,"topics":["deno","http-server","pastebin","plaintext"],"latest_commit_sha":null,"homepage":"https://paste.jlcarveth.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JLCarveth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-14T20:08:41.000Z","updated_at":"2024-05-27T15:37:52.000Z","dependencies_parsed_at":"2023-12-05T17:39:34.442Z","dependency_job_id":"87ad1c16-43cc-4662-81be-90db12a41640","html_url":"https://github.com/JLCarveth/nutty","commit_stats":null,"previous_names":["jlcarveth/nutty"],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JLCarveth%2Fnutty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JLCarveth%2Fnutty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JLCarveth%2Fnutty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JLCarveth%2Fnutty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JLCarveth","download_url":"https://codeload.github.com/JLCarveth/nutty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228500221,"owners_count":17930020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","http-server","pastebin","plaintext"],"created_at":"2024-12-06T17:19:15.204Z","updated_at":"2024-12-06T17:21:29.267Z","avatar_url":"https://github.com/JLCarveth.png","language":"TypeScript","readme":"# Nutty\n#### A simple HTTP paste server - Contributions Welcome!\n\nNutty is a self-hostable paste server, allowing you to easily upload and share text files instantly.\n\n## Features\n- A simple HTTP interface\n- A simple Web interface (WIP)\n- Public and private pastes\n- [Low memory footprint](https://github.com/JLCarveth/nutty/assets/23156861/b449813a-719a-4c9b-8922-f91f70101b1d)\n- Burn-on-read - Pastes that can only be read once\n- Automatic Syntax Highlighting\n\n## Installation\n\n1. Make sure you have Deno installed on your system. If not, you can install it by following the instructions on the [Deno website](https://deno.land/#installation).\n2. Clone the repository by running `git clone https://github.com/JLCarveth/nutty.git`.\n3. Change into the cloned directory by running `cd nutty`.\n4. Run the `paste.ts` file with Deno by running `deno run -A --unstable paste.ts`.\n\nA simple systemd service can also be setup to handle stopping/starting Nutty:\n```Systemd\n[Unit]\nDescription=File pasting API\n\n[Service]\nExecStart=/home/jlcarveth/.deno/bin/deno run -A --unstable paste.ts\nRestart=always\nUser=jlcarveth\nGroup=jlcarveth\nWorkingDirectory=/opt/paste\nEnvironmentFile=/opt/paste/.env\nStandardOutput=journal\nStandardError=journal\n\n[Install]\nWantedBy=multi-user.target\n```\n### Environment\nNutty depends on a couple of environment variables to be established before running.\n|Variable Name|Description|Example Values|\n|---|---|---|\n|`TARGET_DIR`|The directory where pastes will be stored.|`/opt/paste/data`|\n|`BASE_URL`|The base URL at which the API can be accessed.|`https://paste.mysite.com/api`|\n|`SECRET_KEY`|Used for signing JWTs. A secret key can be generated with `openssl rand -base64 32`|`GDZ1FzBF18dtAk2enanqqxskVf5hptmPjy/pcBm384M=`|\n|`PORT`|The port to listen to. Default is 5335|`5335`|\n|`PUBLIC_PASTES`|Whether to allow users to create pastes without an access token.|1,0,true,false|\n|`DEBUG`|Logs incoming requests for debugging purposes.|1,0,true,false|\n|`DOMAIN`|The domain used for the HTTP cookie, as well as the burn URLs. |`paste.jlcarveth.dev`|\n\n## Usage\nThere is a simple client bash script which provides a simple example of using Nutty.\n```\nexport TOKEN=$(curl https://paste.jlcarveth.dev/api/login -X POST -H \"Content-Type: application/json\" -d '{\"email\":\"jlcarveth@gmail.com\",\"password\":\"notmypassword\"}')\nexport EMAIL=\"jlcarveth@gmail.com\" # Email is used for signing PGP messages\nuuid=$(cat file.txt | bash client.sh)\n```\nIf the client runs successfully, a UUID associated with the new paste is returned. This paste can then be retrieved with a simple GET request:\n```\ncurl $API_URL/$UUID -H \"X-Access-Token: $TOKEN\"\n```\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJLCarveth%2Fnutty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJLCarveth%2Fnutty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJLCarveth%2Fnutty/lists"}