Skip to content


Repository files navigation


License Release Version Dependencies

Simple Node.js pastebin built with Koa, MongoDB, Pug, Bootstrap and Prism.js.

Try it out at


  • Full syntax highlighting via Prism.js
  • Automatic and configurable paste expiry
  • Full support for CLI requests with curl, Wget etc
  • CTRL+Enter hotkey for quick paste submission
  • Short and readable URLs via nanoid, e.g. /qNGDwRyx
  • Textarea grows to fit content via autosize.js
  • Runs fully containerized with Docker

CLI Usage

# Simple paste
$ echo 'Hello World' | curl -F 'paste=<-'

# Either form, multipart or raw text data is accepted
$ curl -F 'paste=Sent as form data'
$ curl -d 'paste=Sent as multipart data'
$ curl -H "Content-Type: text/plain" -d 'Sent as raw text'

# Wget or any other tool is fine too
$ wget --post-data 'paste=Hello from Wget' -qO-

# Upload a file
$ curl -F 'paste=@path/to/file.txt'

# Specify the expiry time in seconds
$ curl -F 'paste=2 minutes' -F 'expire=120'
$ curl -F 'paste=2 minutes'

# Specify the syntax to highlight
$ git diff | curl -F 'paste=<-'
$ curl -F 'paste=@path/to/file.diff' -F 'highlight=diff'

# Redirect to content
$ curl -F 'paste=My paste'
My paste

# Combined options
$ curl -F 'paste=My paste' -F 'expire=60' -F 'highlight=shell'
$ curl -F 'paste=My paste' ''


  1. Clone this repo:
git clone && cd paste
  1. Install dependencies:
docker-compose run -e NODE_ENV= --rm --no-deps app npm install
  1. Start the app and watch for changes:
docker-compose run -e NODE_ENV= --rm --service-ports app npm run watch


  1. Follow the first two development steps.

  2. Configure config/docker.json with any custom setting overrides

  3. Configure docker-compose.yml with Docker options and ports to use

  4. Start the production database and Node.js server:

docker-compose up