Skip to content

Latest commit

 

History

History
100 lines (75 loc) · 2.6 KB

README.md

File metadata and controls

100 lines (75 loc) · 2.6 KB

BitBin 📋

BitBin is fully-featured yet simple pastebin/hastebin-like web app for storing and sharing plaintext and code snippets. The web-app was originally intended to be a Hastebin clone but there are more features. BitBin is powered by Node.js (w/ Express) at the backend and MongoDB for the database.

Features

  • Upload and share plaintext/code snippets as URLs.
  • Persistent data storage.
  • Syntax highlighting for 190+ languages (thanks to highlight.js)

Dependencies

  • Express: Fast and minimalist web application framework for Node.js.
  • Mongoose: Object Data Modeling MongoDB and Node.js.
  • EJS: Templating language.
  • highlight.js: Syntax highlighting.
  • nanoid: Small, secure, and URL-friendly unique ID generator.
  • autosize: Standalone script for automatically adjusting textarea height.

🚀 Getting Started

Installation

  1. Clone the repository.
git clone https://github.com/waterrmalann/bitbin.git
  1. Install the dependencies.
npm install
  1. Run the project.
npm start
  1. Access the application.
Open your browser and visit http://localhost:3000

Folder Structure

The folder structure of the project is as follows:

.
├── server.mjs
├── controllers
│   └── snippetController.mjs
├── models
│   └── Snippet.mjs
├── public
│   ├── css
│   │   └── style.css
│   └── js
│       └── script.js
├── views
│   ├── _buttons.ejs
│   ├── _head.ejs
│   ├── new.ejs
│   └── snippet.ejs
├── package.json
├── package-lock.json
├── README.md
└── LICENSE

Document Schema

The Snippet model has the following schema in the models/Snippet.mjs file:

{
    value: {
        type: String,
        required: true
    },
    uniqueID: {
        type: String,
        required: true,
        index: true,
        unique: true
    }
}

🤝 Contribution

Contributions are always accepted. Feel free to open a pull request to fix any issues or to make improvements you think that should be made. Any contribution will be accepted as long as it doesn't stray too much from the objective of the app. If you're in doubt about whether the PR would be accepted or not, you can always open an issue to get my opinion on it.

License

This project is licensed under the permissive MIT License, see LICENSE.