Accessing meteor app mongodb with external tools


#1

I made an app which basically logs certain activity. Now I need to connect this mongoDB with external tools but I cant connect to port 3001. Making telnet to this port shows nothing and firewall is down.

Ps. If anyone knows free / gpl ODBC driver for mongo would be great!

Ok, as I understand I have to set somehow disable / set to server ip mongodb option bind_ip setting. How to do that?


#2

Are you talking about accessing a local Meteor based mongo instance, or a remote one? If you want to access a local one you just need to supply the local mongo URL to your mongo client. You can get the local mongo URL by running:

meteor mongo --url

Let’s say you wanted to connect to this instance using the mongo CLI tool - you would run:

mongo 127.0.0.1:3001/meteor

If you’re talking about accessing a remote mongo instance however, then we’ll need more details. How is your remote mongo instance setup - are you using a 3rd party mongo provider, are you using a mongo instance created via something like mup, etc.


#3

I’m not talking about local instance. I’m not going to bother you with the details :slight_smile: but to be precise I need to access MongoDB remotely with MS Excel or Access :slight_smile: - dont ask. But robomongo will do right now I guess


#4

Yikes - I promise I won’t ask; I don’t want to wake up in the middle of the night screaming! :scream:


#5

Oh, I’m going to ask … are you going to use MongoDB Connector for BI or some other solution?


#6

:smiley: yes my thoughts exactly :slight_smile:


#7

Well you asked for it :). I’m in a small company that produces prebuilt wooden houses and the production part wants to know precisely when someone is done with his job and next one can step in and how much time it took. Pretty basic. And now I just found out that they have a really clever “engineer” who made manufacturing IS based on Excel. At least 3 excel files full of macros. And how i found it out - they turned to me so that I could by them MS Access licenses and when I asked why they showed me the system. They want access because excel could not handle it any more :). The really cool part is how they solved reporting. The have a central “server - phone” :slight_smile: so when someone starts or finishes some action they send an sms to this phone. This “server - phone” reads sms and appends it to CSV file, which is located on google drive and synced to a local pc where Excel is running where is a macro that reads the file on GDrive and appends those lines to a spreadsheet :). So based on production planning and user data ( phone nr. the sms came from ) on another excel sheet they know how much time it took to make it and when the next guy can go to work.
So as i’m a person in charge of IT here I’m starting to “FIX” it :slight_smile: step by step. First I made a work reporting app to eliminate the SMS mess. So now they reports go to MongoDB but still I need the connector for other Excel sheets to get the data. If they like it and I have time for it I’ll go for the next step eliminating the need for the Excel “connector”. Most probably it means more functions for my app. The problem is I’m just starting with NodeJS and Meteor and it’s not going as fast as I would like and I dont want to do it with PHP and MySQL :).
So here you have why I need MongoDB to Excel connection :slight_smile:


#8

Awesome architecture - love it! :stuck_out_tongue_winking_eye:

It sounds like you don’t actually need to access Mongo from Excel, but you need Excel from Meteor?

Which is doable with the npm exceljs module. Although I’m not saying it will be easy!


#9

Yes, maybe they dont need the reporting in real time, maybe a user can get daily “updates” from app. I’ll have to check it :slight_smile:


#10

I’m thinking that Meteor reacts to a change in Mongo and updates the spreadsheet immediately.


#11

Yes but some has to download the spreadsheet to the “local computer” where the production planning spreadsheet is.


#12

If you need to connect to external mongoDB instance which was created by Meteor.js you need to change ip binding, look: http://stackoverflow.com/questions/20618035/unable-to-access-meteor-mongodb-running-on-vm-from-the-host-using-the-ip-address

You can do it manually by edit meteor file or from console:

cd ~ && sed -i '0,/127.0.0.1/s//0.0.0.0/' .meteor/packages/meteor-tool/.1.3.1.6yhl3g++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/runners/run-mongo.js

Remember that you can have another meteor-tool version


#13

I wish you well: it’s an interesting project to tackle, ripe for bringing up to date, and Meteor is a good way to attack it.

:thumbsup:


#14

Yeah, “interesting”.

I’m wondering if future workflows will involve printing out the SMS, taking a photo of it on a wooden table and then sending it on via E-Mail so it can be run through an OCR program or something.


#15

That would be truly awesome :wink:, but it seems @imapi has already removed the SMS component:


#16

I was just about to add to the humour of this by mentioning this would only be possible in this project if Excel could be used to handle the OCR … until I did a search and found out this is actually possible … suddenly nothing is funny anymore …


#17

It’s certainly worthy of an article for the The Daily WTF.

That’s where the idea with the wooden table came from, by the way.