{"id":29173218,"url":"https://github.com/kunniii/simple_pastebin","last_synced_at":"2026-04-18T01:05:41.503Z","repository":{"id":301083021,"uuid":"1008106398","full_name":"Kunniii/simple_pastebin","owner":"Kunniii","description":"Simple Node.js Pastebin - A minimalist pastebin service built with Node.js and Express that uses content hashing for unique paste identification.","archived":false,"fork":false,"pushed_at":"2025-06-25T03:51:35.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-25T04:29:31.876Z","etag":null,"topics":["backend","content-hashing","deduplication","express","file-storage","javascript","minimal","nodejs","pastebin","self-hosted","sha256","web-app"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Kunniii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null}},"created_at":"2025-06-25T03:28:59.000Z","updated_at":"2025-06-25T03:51:38.000Z","dependencies_parsed_at":"2025-06-25T04:39:46.839Z","dependency_job_id":null,"html_url":"https://github.com/Kunniii/simple_pastebin","commit_stats":null,"previous_names":["kunniii/simple_pastebin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Kunniii/simple_pastebin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kunniii%2Fsimple_pastebin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kunniii%2Fsimple_pastebin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kunniii%2Fsimple_pastebin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kunniii%2Fsimple_pastebin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kunniii","download_url":"https://codeload.github.com/Kunniii/simple_pastebin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kunniii%2Fsimple_pastebin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262978722,"owners_count":23394016,"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":["backend","content-hashing","deduplication","express","file-storage","javascript","minimal","nodejs","pastebin","self-hosted","sha256","web-app"],"created_at":"2025-07-01T14:11:09.468Z","updated_at":"2026-04-18T01:05:41.443Z","avatar_url":"https://github.com/Kunniii.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Node.js Pastebin\n\nA minimalist pastebin service built with Node.js and Express that uses content hashing for unique paste identification.\n\n**Topics:** nodejs express pastebin file-storage content-hashing sha256 deduplication web-app minimal javascript backend url-shortener\n\n## Features\n\n- **Content-based hashing** - SHA-256 hash of content as paste ID\n- **Short URLs** - 8-character shortened URLs for easy sharing\n- **Automatic deduplication** - Identical content shares same URL\n- **Raw text view** - Access raw content at `/raw/:id`\n- **File-based storage** - Stores pastes as text files locally\n- **Clean interface** - Minimal UI focused on functionality\n- **XSS protection** - Basic HTML escaping for security\n\n## Installation\n\n1. **Clone the project**\n\n2. **Install dependencies**\n\n```sh\nyarn install\n```\n\n3. **Start the server**\n\n```sh\nnode index.js\n```\n\n## Usage\n\n### Creating Pastes\n- Visit `http://localhost:3000`\n- Enter your content in the textarea\n- Click \"Create Paste\"\n- Get both full and short URLs for your paste\n\n### Viewing Pastes\n- **HTML view**: `/paste/:id` - Formatted display\n- **Short URL**: `/s/:shortId` - Redirects to full paste (8 chars)\n- **Raw view**: `/raw/:id` - Plain text content\n\n### API Endpoints\n- `GET /` - Home page with paste form\n- `POST /paste` - Create new paste\n- `GET /paste/:id` - View paste in HTML format\n- `GET /s/:shortId` - Short URL redirect to full paste\n- `GET /raw/:id` - View raw paste content\n\n## How It Works\n\n1. **Content Hashing**: Uses SHA-256 to generate unique IDs from content\n2. **Deduplication**: Same content always gets same hash/URL\n3. **File Storage**: Saves pastes as `{hash}.txt` in `./pastes/` directory\n\n## Project Structure\n\n```\npastebin/\n├── index.js        # Main application\n├── package.json    # Dependencies and config\n├── pastes/         # Auto-created directory for paste files\n└── README.md       # This file\n```\n\n## Configuration\n\n- **Port**: Default 3000 (change `PORT` variable in index.js)\n- **Storage**: Files stored in `./pastes/` directory\n- **Hash Algorithm**: SHA-256 (64 character hex strings)\n\n## Security Notes\n\n- Basic XSS protection with HTML escaping\n- No authentication or rate limiting\n- Files stored locally (not suitable for production without modifications)\n- Consider adding HTTPS or use behind proxy, rate limiting, and proper security headers for production use\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkunniii%2Fsimple_pastebin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkunniii%2Fsimple_pastebin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkunniii%2Fsimple_pastebin/lists"}