Line 3476 of mongo.js located in C:\Users\USERNAME\Documents\meteor\apps\APPNAME.meteor\local\build\programs\server\packages\mongo.js says:
var mongoUrl = process.env.MONGO_URL;
console.log('Connection url => ', process.env.MONGO_URL);
on the server prints out
Connection url => mongodb://127.0.0.1:3001/meteor
No where in my windows 10 environment variable name/value is there an entry for MONTO_URL but the there is C:\Program Files\MongoDB\Server\4.2\bin
is in the PATH, which indicates a mongodb installed on this windows 10.
mongod is running as a service on this window 10 machine so in the first cmd terminal opened I can type 'mongo' and get the mongo shell,
How can I use this mongo server instead of meteor mongodb?
https://docs.meteor.com/environment-variables.html#MONGO-URL says: MONGO_URL="mongodb://user:password@myserver.com:10139"
Does that mean the following? MONGO_URL="mongodb://windowsUsername:windowsUserPassword@127.0.0.1:27017/my_db_name"
I have a package.json with this entry:
"scripts": {"start": "meteor run"}
should I change it to
"scripts": {"start": "meteor run", "meteor": "MONGO_URL="mongodb://windowsUsername:windowsUserPassword@127.0.0.1:27017/my_db_name" }
https://docs.npmjs.com/creating-a-package-json-file does not give examples for this case.
What about running the app, the link https://docs.meteor.com/commandline.html#meteorrun says to type meteor
which is the same as meteor run
, is the script line "start": "meteor run",
not needed then?
do I need to worry about npm run meteor
as indicated here
https://stackoverflow.com/a/35256627/5047454
Thanks