node.js - How to get Meteor's MongoDB URL from javascript -


I am writing a meteorite smart package wrapper for a NMP module called Agenda. The agenda does not naturally know that it is working with the meteor, so let me manually give it a MongoDB URL. I can get this URL by typing meteorite-U , but I would like to get the script automatically so that users of the plugin do not worry about manually changing it. How can I do this?

The Mongo url is stored in the environment variable called MONGO_URL. In the meteor, you can use the ENVi variable with the process.env object (on the server). You can get it from the process.env.MONGO_URL property

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -