A replica set in MongoDB is a group of mongod processes that maintain the same data set. With multiple copies of data on different database servers, replication provides a level of fault tolerance against the loss of a single database server. All databases hosted on …
Node.js
Finding location within the certain range of Latitude & Longitude using Node.js and MongoDB
In this post, I will explain by example how we can find nearest locations by given latitude and longitude with MongoDB. First step – Create schema: // create geolocation Schema const GeoSchema = new Schema({ type: { type:String, …