This issue has been inherent in a ll previous builds and it was promised that this would resolved in Meteor 1.4 ( I recall reading this somewhere).
Is there a way to force meteor to make use of 64 bit Mongo? All projects are being nagged by a warning in the console stating that I am using a deprecated version of mongo (32-bit).
I don’t want to see comments explaining why the problem’s still there. I only want some proper instructions to get meteor to use a 64 bit mongo. There seems to be no issues with the 64 bit Mongo on Windows 10 now. So I see no issue why devs are not given an upgrade path here.
I also read somewhere (I think on StackOverflow) that the 32-bit is used in dev-mode and that its a non issue in production mode as it allows you to use any version. I however could not find anything to verify this.
This is basically true, in that Meteor dev installs a local MongoDB for you. In production you have to install your own MongoDB (or connect to a third party service).
However, you can also install-or-connect in dev. So, on Windows install your own local MongoDB or connect to a 3rd party service, and set your MONGO_URL accordingly. For example (locally installed):
set MONGO_URL=mongodb://localhost:27017/database_name
meteor
on a different note (looking at the above). Is it possible to create two separate meteor apps and one common mongodb? or would i have to go into an issue of replication in such a scenario?
I think i have to rephrase that (my fault). What i meant was “is it possible to have multiple apps running on the same set of collections”? I’m still fairly new to mongo so i tend to use db terminology. Sorry.
Thanks so to recap where do i find the url setting for the mongodb of the given app? Is it in a config file? As i’d rather not use the command line. I will try to install a 64 bit mongo locally and point meteor to use that one.
If you install it on your local dev machine, it will be `mongodb://localhost:27017" by default.
Meteor dev defaults to a database name of meteor by default, but I suggest explicitly specifying the name as in my first reply, so something like mongodb://localhost:27017/database_name.
MongoDB has a configuration file, which you can edit if you need to change things like the port number.
That i realised it has two db’s ‘local’ and ‘meteor’ . But how do i make a meteor app Point to the separately installed MongoDB? Would meteor locate the informaiton from that mongo configuration file?
you set the following environment variables in both apps as follows :
$ MONGO_URL=mongodb://x.x.x.x:xxxxx/myappdb
if you want to test more than one app in tandem on the same machine out you would specify a different port number when running it from command prompt like so …
meteor --port 8000
When you don’t specify a port number it defaults to 3000. …
Read your post in my other thread which is totally unrelated to what you are trying to accomplish here. Just to clarify how settings (settings.json) and startup (package.json) scripts work.
settings.json is there primarily to allow you to put in config settings that are spread application-wide (if needed). Setting them as private makes them available to the server whereas setting them as public makes them available both to client and server. By default they are only available to the server. Note that these are made available AFTER the app starts running. And I am starting to think that MONGO_URL cannot be modified dynamically after startup (but that’s just me). In order to force your app to use the settings you have to run your meteor app with the following command.
meteor --settings settings.json
Now package.json is an optional file (which sits in the root of your app. It might not be there so you would have to create it). package.json is YAJF which gives you the facility to put in start-up scripts BEFORE the app runs. A sample for your scenario is shown below:
Since meteor is built on-top of NodeJS you can then make use of npm to locate this package.json and start the related script. You could have multiple scripts but since mine is called ‘start’ you would invoke the config script start via npm inside your project folder like so…
npm start
Notwithstanding all this, what I was trying to do was to change process.env (environment variable) inside Meteor.onStartup() and this is different from what you required.