GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Nugine/pastebin-server

This repository was archived by the owner on Apr 2, 2020. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

25 Commits
25 Commits

Folders and files

NameName
Last commit message
Last commit date
bench
bench
 
 
src
src
 
 
.env
.env
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
kill.sh
kill.sh
 
 
restart.sh
restart.sh
 
 
start.sh
start.sh
 
 

Repository files navigation

pastebin-server

Deploy

$ cargo build --release
$ . ./start.sh

JSON API

  • POST /record

    interface Request{
        title: string,
        lang: string,
        content: string,
        expiration: number,
    }
    interface Response{
        key: string
    }
  • GET /record/{key}

    interface Response{
        title: string,
        lang: string,
        content: string,
        saving_time: number,
        expiration: number,
        view_count: number
    }
  • Error

    interface Error{
        code: number,
        message: string
    }

Environment

Prefix: PASTEBIN_

Shared Variable

var default unit description
ADDR localhost:8088 Binding address
CRYPT_KEY magic Crypto key for short url
MAX_POST_SIZE 32768 byte Max length of POST request body

Built-in Memory Store

var default unit description
MAX_STORE_SIZE 104857600 byte An ambiguous size count for controlling server memory usage
MAX_EXPIRATION 604800 second Max expiration time
CLEAN_DURATION 5000 millisecond GC interval

Redis Store

var default unit description
REDIS_URL set PASTEBIN_REDIS_URL to enable redis store

Example

.env

RUST_LOG=info
PASTEBIN_ADDR=localhost:8000
PASTEBIN_CRYPT_KEY=MyImportantSecret
PASTEBIN_REDIS_URL=redis://localhost:6379

About

No description or website provided.

Topics

actix-webpastebin-apipastebin-serviceredis-databaserust-server

Resources

Readme
MIT license

Code of conduct

Code of conduct

Security policy

Security policy
Activity

Stars

10 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.