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.
- Upload and share plaintext/code snippets as URLs.
- Persistent data storage.
- Syntax highlighting for 190+ languages (thanks to highlight.js)
- 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.
- Clone the repository.
git clone https://github.com/waterrmalann/bitbin.git
- Install the dependencies.
npm install
- Run the project.
npm start
- Access the application.
Open your browser and visit http://localhost:3000
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
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
}
}
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.
This project is licensed under the permissive MIT License, see LICENSE.