node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



A boilerplate bin website for saving text in a database and access it with a short URL. Very similar to PasteBin or JSBin. This is mostly back-end implementation of the website. Front-end is very simple.

Try a version of the app running here

Work in progress


Running locally

git clone
cd anybin
npm install
npm run dev

Server command line options

  • config for selecting the configuration file
  • views for selecting the folder to look for index.ejs file
  • public for selecting public content folder
  • db MongoDB URL, it will override database URLs in config.js
$ node app/server.js \
  --config='/path/to/my/config.js' \
  --views='/path/to/my/views-folder/' \
  --public='/path/to/my/public-folder' \



Operation Path Description
GET / Load homepage
GET /?import=url Load homepage and import from url
GET /:id Load a bin
GET /:id/:version Load a bin at a version


Operation Path Description
POST /api/ Make a new Bin
POST /api?import=url Make a new Bin form url
GET /api/:id Get latest version of a bin
PUT /api/:id Update latest version of a bin
POST /api/:id Add a new version to a bin
GET /api/:/id/:version Get a specific version of a bin