A lightweight self-hostable pastebin for storing code in your preferred langage
- Next.js
- Tailwind
- Ace Editor
- Next Themes
- MongoDB (
mongoose
)
Note: Docker compatibility is currently in progress
- Clone the repository
git clone git@github.com:atomisadev/atombin.git
cd
into the repository
cd atombin
- Install dependencies
npm install
- Create a new file called
.env.local
touch .env.local
- Populate the
.env.local
file with environment variables like so
MONGODB_URI=<your mongodb uri>
- Run the development server
npm run dev
You can use a tool like pm2
to manage running the website. Or, you can host your own instance of this project on Vercel/Heroku.
The API that is the backbone of this project is accessible by the developers.
Supported endpoints:
Method: GET
Function: This endpoint will return the slugs (id) of all the available atombin documents
Method: POST
Function: This endpoint will allow you to create new documents to atombin
Body:
content
- The actual content of the code
Method: GET
Function: Get the content of any existing post using its id
Please note that these endpoints were not made with developer experience in mind. So, it isn't optimized for the best and easiest developer experience as this is something I hacked together in like an hour as a challenge.