MongoDB Installation

I want to install MongoDB and i want to get MongoDB URL. How can i make it ?

If you have MongoDB hosting somewhere (such as MongoDB Atlas), outside of Glitch, then you can connect to it from your Glitch project - you probably want to construct the URL something like this:

// Standard URI format: mongodb://[dbuser:dbpassword@]host:port/dbname, details set in .env
var uri = 'mongodb://'+process.env.USER+':'+process.env.PASS+'@'+process.env.HOST+':'+process.env.PORT+'/'+process.env.DB;

You might look at ~mongodb?

On the other hand, if you were thinking about running the open-source MongoDB software on Glitch, that is much more difficult, and I would not recommend it. If you want to use the Glitch project’s disk space to persist data, use something like SQLite: ~hello-sqlite or LevelDB: ~hello-leveldb.

Hope this helps,

Johnicholas

2 Likes