CodeShare is an open-source code sharing application, with similar features to other websites, such as Pastebin and Hastebin.
You can either visit The Official Instance, or host the website yourself!
Afterwards, click on Create a Document to write and share your code!
- Clone the repository and install the dependencies
$ git clone https://github.com/BytesToBits/CodeShare.git
$ cd CodeShare
# Run one of the following but make sure to use the same package manager on step 3 as well!
$ npm install
# or
$ yarn- Create a
.envfile and paste the following text, filling the variables with your settings
MONGO_URI=<your_mongo_uri>- And you can now run the project!
$ npm run build
$ npm run start
# or
$ yarn build
$ yarn startYou can get a free 500MB Database from MongoDB Atlas. That will last for a really long time.
Head over to Atlas and create a new account. You will then be greeted with this panel.

Select the FREE one and give it a name. Follow these steps;
- Go to
Database Accesssection under theSecuritytab and click+ ADD NEW USER. Give itRead and write to any databasepermissions so the bot can properly store the data. Give it a username and a secure password. Save the password only. - To allow the bot to actually access the database, you should whitelist all IP's. Go to
Network Accesssection under theSecuritytab and click+ ADD IP ADDRESS. Click theAllow Access From Everywhereand0.0.0.0/0should appear in theWhitelist Entry. If it doesn't, enter it manually. Lastly, click confirm. - Time to connect to the Database! Go to
Clusterunder theDATA STORAGEtab. If your database is still setting up, please wait until it's done! Once it is, click theCONNECTbutton andConnect Your Application. Copy a link that looks like this;mongodb+srv://<username>:<password>@cluster0.r4nd0m.mongodb.net/myFirstDatabase?retryWrites=true&w=majority - Lastly, remove the
myFirstDatabase?retryWrites=true&w=majoritypart and replace<username>with your user's name (sometimes it is already replaced in if there's only one user), and<password>with your saved password. - Your database is done!
All contibutions are welcome!

