Simple Node.js pastebin
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Joe Biellik 16f8548f0e Add robot indexing rules 10 years ago
config Update Docker configuration 10 years ago
controllers Add paste expiry 10 years ago
models Add paste expiry 10 years ago
public Add robot indexing rules 10 years ago
views Store selected highlighter in the URL 10 years ago
.editorconfig Improve README 10 years ago
.eslintignore Initial commit 10 years ago
.eslintrc Initial commit 10 years ago
.gitattributes Initial commit 10 years ago
.gitignore Update Docker configuration 10 years ago
LICENSE.md Add license file 10 years ago
README.md Improve README 10 years ago
Vagrantfile Initial commit 10 years ago
app.js Upgrade to Babel v6 10 years ago
db.js Initial commit 10 years ago
docker-compose.yml Update Docker configuration 10 years ago
package.json Add paste expiry 10 years ago
production.yml Fix indenting 10 years ago
router.js Add paste expiry 10 years ago
server.js Initial commit 10 years ago

README.md

paste

License Node.js Version Release Version Dependencies

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

Try it out at paste.fyi

Features

  • Clean code thanks to ES7 async/await, Koa and Babel
  • Full syntax highlighting via Prism.js
  • Short URLs via shortid, e.g. NyQO9puMe
  • Full support for CLI requests with curl etc
  • Automatic and configurable paste expiry
  • Runs fully containerized with Docker and Vagrant
  • Simple and responsive UI built with Bootstrap 4

Development

  1. Clone this repo:
git clone https://github.com/JoeBiellik/paste.git && cd paste
  1. Start the virtual machine and connect:
vagrant up
vagrant ssh
  1. Install dependencies:
npm install
  1. Start MongoDB:
docker-compose up -d
  1. Start app and watch for changes:
npm run watch

Deployment

  1. Configure config/docker.json with any custom settings

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

docker-compose -f production.yml up -d