Setting Up MongoDB Server
MongoDB is a NoSQL database that is used by spoo.me to store data. You can set up a MongoDB server on your server or use a cloud service like MongoDB Atlas.
It is recommended to use a MongoDB Atlas server as it is easy to set up and manage and has a generous free tier.
Follow these steps to claim you free Mongo Server via MongoDB Atlas:
-
Go to MongoDB Atlas
-
Sign up for an account
-
Click on the
Build a Cluster
button-
Choose the free
M0 tier
-
Enter any random cluster name of your choice
-
Choose any of the available provider, recommended
AWS
-
Choose the region closest to you
-
Click on the
Create Deployment
button -
Wait for the cluster to be created
-
-
After Your free cluster is created, a new window
Connect to Cluster0
will popup-
Fill out the fields
Username
andPassword
. Please set a highly secure password as it is the key to your whole database -
Click on the
Create Database User
button -
After the user is created, click on
Choose a connection method
button -
Under the
Add your connection string into your application code
section copy the displayed connection string -
Your connection String should be in this format -
mongodb+srv://<your-username>:<password>@<cluster-name>.mongodb.net/?retryWrites=true&w=majority&appName=<cluster-name>
-
Replace the
<password>
with the password you set in the previous steps -
Save the connection string securely for future use
-
Close the Dialog Box
-
-
Go to the
Network Access
page via the sidebar-
Click on
Add IP Address
button -
Click on
ALLOW ACCESS FROM ANYWHERE
button and pressConfirm
-
-
Congratulations 🎉 you have successfully setup your free mongoDB server
-
The Connection String created in the previous steps is very crucial for hosting the server, store it securely