2021-12-12 20:02:44 +00:00
2021-10-27 23:37:42 +01:00
2021-10-27 23:37:42 +01:00
2021-03-26 22:00:12 +00:00
2021-12-12 20:02:44 +00:00
2021-03-26 22:00:12 +00:00
2021-04-02 13:07:06 +01:00
2021-10-27 23:37:42 +01:00
2021-03-26 22:02:21 +00:00
2021-03-27 11:49:46 +00:00
2021-10-27 23:37:42 +01:00
2021-12-12 19:43:58 +00:00

📋 paste

paste is a simple web app for writing & sharing code. It's my own take on conventional pastebin sites like pastebin.com or hastebin.

The frontend (this repository) is written using the React framework. The backend data storage is handled by a separate web service called bytebin.

The user-interface is quite simple; it supports syntax highlighting, automatic indentation, many supported languages, themes, zooming in/out, linking to specific lines or sections, and more!

Usage

I host a public instance of paste at paste.lucko.me. Please feel free to use it to share code/configs/whatever!

However please note that the (very-non-legally worded) terms of service for my public bytebin instance apply here too. If you come across any content which is illegal or infringes on copyright, please get in touch and let me know so I can remove it.

Uploaded content is retained for 30 days then deleted.

Host your own

If you want to host your own paste, first you need to compile it:

git clone https://github.com/lucko/paste
yarn install
yarn build

# or run the following instead of 'yarn build' to start a webserver for testing/development
yarn start

You can then follow the create-react-app deployment documentation for how to host the build output. I personally recommend deploying to the cloud using a service like Netlify instead of hosting on your own webserver.

If you really want to self-host (including the bytebin data storage part), I suggest using Docker:

git clone https://github.com/lucko/paste
docker compose up -d

You should then (hopefully!) be able to access the application at http://localhost:8080/.

API

paste uses bytebin for data storage.

As a result, you can use the bytebin API to submit/read content programatically.

To set the language of a paste, use the Content-Type header with value text/<language> (e.g. Content-Type: text/yaml for a .yml file).

Description
paste is a simple web app for writing & sharing code.
Readme 1 MiB
Languages
TypeScript 94.6%
HTML 2.4%
JavaScript 1.5%
CSS 0.8%
Dockerfile 0.7%