Skip to content

ccollicutt/eat-paste

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9321f68 · Apr 16, 2023

History

6 Commits
Apr 16, 2023
Apr 16, 2023
Apr 16, 2023
Apr 16, 2023
Apr 16, 2023
Apr 16, 2023
Apr 16, 2023
Apr 16, 2023
Apr 16, 2023
Apr 16, 2023
Apr 16, 2023
Apr 16, 2023
Apr 16, 2023
Apr 16, 2023

Repository files navigation

eat-paste

Miss Hoover: Now put paste on your paper. Ralph, are you eating your paste?
Ralph Wiggum: (Gluestick poking out of his mouth) No, Miss. Hoover.

Run Tests

This is a simple paste server. There is no authentication, you simply send a text/plain post to /paste on the server and get back a slug. The text that was posted will then be available at that slug.

Note that the paste server won't accept anything that the Python Bleach library doesn't like.

It uses a MongoDB database as the backend.

Usage

$ echo "hi there you super cool paste thing" | \
curl -H "Content-Type: text/plain" -X POST --data-binary @- http://localhost:5000/paste
savvy-caracal

Now curl that paste.

$ curl localhost:5000/paste/savvy-caracal
hi there you super cool paste thing

MongoDB

The application expects a MONGO_CONNECTION string. That could be a simple MongoDB Altas shared database.

Curl Examples

Send a file:

curl -d "@data.txt"  -H "Content-Type: text/plain" -X POST http://localhost:5000/paste

Echo some text:

echo "hi there" | curl -H "Content-Type: text/plain" -X POST --data-binary @- http://localhost:5000

About

A simple text/plain only paste server

Resources

Stars

Watchers

Forks

Releases

No releases published