I’m new to Meteor and am just using it as part of my University work experience.
I’m trying to run my application locally but connecting to an external MongoDB not the default meteor mongo.
I’m connecting to this external database by navigating to my project directory and typing:
SET MONGO_URL=“mongodb://Name:Password@******-shard-00-00-ptsbj.mongodb.net:27017,******-shard-00-01-ptsbj.mongodb.net:27017,******-shard-00-02-ptsbj.mongodb.net:27017/admin?ssl=true&replicaSet=******-shard-0&authSource=admin”
(Obviously with the relevant details filled in)
And typing “meteor”.
This seems to work fine, although there is no sort of confirmation that a connection is successful or even attempted to be made.
But my question is what do I have to do within my meteor project to actually call for some data to be displayed from this external database - All the tutorials I watch only show how to call from the default local MongoDB.
For example, using the Mongo shell I can see that I have 3 databases - “Admin”, “Local” and “Names”.
Within the names database I have a collection called “NamesList” which contains an array of random names.
What do I have to do within my meteor app to display and list that “NamesList” collection?
Apologies if this is a really dumb question but I seem to be going round in circles myself so could really do with a bit of advice!
Thank you!