An open API service indexing awesome lists of open source software.

https://github.com/nitindahiya-dev/rust-pastebin

Allows you to create, store, and share text pastes with unique tokens
https://github.com/nitindahiya-dev/rust-pastebin

actix-web pastebin rust sqlite

Last synced: 2 months ago
JSON representation

Allows you to create, store, and share text pastes with unique tokens

Awesome Lists containing this project

README

          

# 📋 Actix Web Pastebin

Welcome to the **Actix Web Pastebin** project! This modern and minimalistic web application allows you to create, store, and share text pastes with unique tokens. Built with Rust and Actix Web, it ensures performance and reliability.

## ✨ Features

  • 📝 **Paste Creation:** Easily submit text content which is stored with a unique token.

  • 🔍 **Paste Retrieval:** Access stored pastes via a unique URL.

  • 🎨 **Static File Serving:** Serve static files like CSS for styling.



  • ## 🛠️ Prerequisites

  • **Rust:** Make sure you have Rust installed. Get it from [rust-lang.org](https://www.rust-lang.org/).

  • **SQLite:** This project uses SQLite as the database.



  • ## 📁 Project Structure

  • **main.rs:** The main entry point of the application.

  • **AppState:** Struct to hold the database connection.

  • **index:** Handler for serving the main page.

  • **submit:** Handler for submitting new pastes.

  • **get_paste:** Handler for retrieving pastes by token.



  • ## 🚀 Getting Started

    Follow these steps to get the project up and running on your local machine:

    1. **Clone the repository:**
    ```sh
    git clone https://github.com/yourusername/actix-web-pastebin.git
    cd actix-web-pastebin
    ```

    2. **Build the project:**
    ```sh
    cargo build
    ```
    3. **run the project:**
    ```sh
    cargo build
    ```