Skip to content

vtstv/Pastebin

Repository files navigation

Advanced Pastebin

A modern, GitHub-style pastebin service built with TypeScript, Express.js, and SQLite.

image image

Features

  • 📝 Modern UI: GitHub-inspired design with dark/light theme toggle
  • 🎨 Syntax Highlighting: Support for multiple programming languages
  • Line Numbers: Toggle-able pink line numbers with copy functionality
  • Admin Panel: Comprehensive management and activity logging
  • 🗄️ Database: SQLite with Prisma ORM for easy development
  • 🔒 Security: Rate limiting, CSP headers, and XSS protection
  • 📱 Responsive: Mobile-friendly navigation and layout
  • 🔍 Search: Full-text search with SQLite compatibility

Quick Setup

1. Install Dependencies

npm install

2. Setup Database

# Automated setup (recommended)
npm run db:setup

# Or manual setup
sqlite3 pastebin.db < schema.sql
npm run db:generate

3. Environment Setup

Copy the example environment file:

cp .env.example .env

The .env file should contain:

DATABASE_URL="file:./pastebin.db"
PORT=3000
SESSION_SECRET=your-super-secret-session-key-change-this-in-production
NODE_ENV=development

4. Run the Application

   npm install

Usage

Development

npm run dev

Production

npm start

The server will start on http://localhost:3000

Configuration

  • Port: Set via PORT environment variable (default: 3000)
  • Storage: Currently uses in-memory storage. For production, consider using a database.

Notes

  • Consider adding rate limiting and input validation for production
  • HTTPS is recommended for production deployment

Credits

Pastebin by Murr

License

MIT License - see LICENSE file for details.

Copyright (c) 2025 Murr (vtstv)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published