How to setup mongoldb on local server from Exercise Tracker Project

How to setup mongoldb on local server from Exercise Tracker Project
0.0 0

#1

In the Apis and Microservices Projects - Exercise Tracker, the provided glitch template has an option to use localhost mongodb that,

mongoose.connect(process.env.MLAB_URI || 'mongodb://localhost/exercise-track' );

If anyone knows how to set up the mongodb on the local server?


#2

I’m also curious on what this localhost option entails.


#3

I think you use a db on localhost if your db is on the same server as your web service/app. I doubt you can create a mongodb within glitch. I think you always have to use something external for mongo on glitch.