FAQ Database Discussion Community


How to connect chrome extension with mongolab

google-chrome-extension,mongolab
I have a chrome extension i have made a sign up page and now i want to connect it with mongolab and store the data into the mongolab collection . Basically i want to make connection of a chrome extension with mongolab.

How to get node.js to connect to mongolab using mongoose

database,node.js,mongodb,mongoose,mongolab
I've been trying to use mongoose (module for node.js and mongodb). And tried to get a connection with mongolab up and running. I tried the following at the top of my app.js file, but I couldn't seem to enter the db.on function. global.mongoose = require('mongoose'); var uri = 'mongodb://username:[email protected]:#####/db'; global.db...

How to configure MongoEngine for Heroku

python,django,mongodb,heroku,mongolab
I have postgresql as my main database and I am using mongodb for 'audit-trail' purposes. I am using mongoengine for my django app. In localhost, in order to connect to mongodb database I did this: connect('dbname') and that is it, as documentation suggested. But this is not working in heroku....

500 internal server error while saving data to mongoDB

angularjs,node.js,mongodb,mongolab
I have a simple client that post data to the server, and the server save the data into mongoDB. When i send the data into post request i find the data in the body but in the process of saving this data i get internal server error. Note: am using...

MEAN Stack Error when calling two diferent api's routes at the same time

angularjs,node.js,mongodb,mongoose,mongolab
Having some issues with angularjs, mongoose or MongoLab. If a make two api calls to different api route at the same time, the data won't load. So i got it working by waiting for each call to finish (with promise) before making the next call. This way for me doesn't...

Mongodb find() returns undefined (node.js)

javascript,node.js,mongodb,mongolab
Ive been playing around with mongodb in node.js. I have made a basic collection with some data (i know its there ive checked). When I try to run a find() on the collection it returns undefined. I dont know why this is. The code is below: function get_accounts(){ var MongoClient...

MongoDump Command Not Found on AWS EC2 Instance

mongodb,amazon-web-services,deployment,amazon-ec2,mongolab
Inside AWS EC2 Instance, I am trying to import my MongoLab hosted Database using mongodump command. sudo mongodump -h dsXXXX.mongolab.com:xxxxx -d testDB -u XXXXX -p YYYYYYY -o dumpmongolabs I get the following error -bash: mongodump:command not found I had installed MongoDB like this echo "[10gen] name=10gen Repository baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64 gpgcheck=0" |...

Getting NullPointerException on MongoTemplate [duplicate]

spring,mongodb,mongolab
This question already has an answer here: Why is my Spring @Autowired field null? 5 answers i'm using Spring + jersey + mongodb(on mongolab) + maven the web service part is working fine but when i try to connect to the database i get a null pointer exception on...

Android MongoDB Document iteration not consistent, confused

java,android,mongodb,iteration,mongolab
I'm trying to iterate through all my documents and parse the values and add them to their own lists. The thing is when I try to parse and add to the list it stops early half way through to be exact. But when I don't add all the extra code...

MongoDB - distinct and count, the simplest case

mongodb,count,distinct,mongolab
I have database XXX and collection YYY in MongoDB (using MongoLab). Here is a sample record: { "_id": { "$oid": "551a5asdfsdfsdfs" }, "_class": "com.test.com", "mvid": "d0fffsdfs" } I would like to retrieve all distinct values of the field "mvid" and count them. Here is what found on the internet: db.YYY.aggregate([{...

mongodb.yml for heroku using mongolab

ruby-on-rails,heroku,mongoid,mongolab
I tried to deploy my new rails app to heroku using mongolab (Only rails framework) $ rails new myapp --skip-active-record $ cd myapp b. Add gems to Gemfile ruby '2.2.0' gem 'mongoid', '~> 4', github: 'mongoid/mongoid' gem 'bson_ext' group :production do gem 'rails_12factor' end c. bundle those gems and generate...

Import collection to mongodb server from gmaps library in python

python,mongodb,google-maps-api-3,pymongo,mongolab
I'm using python and i'm try to import a JSON like i'm recieving from this code: from gmaps import Geocoding api = Geocoding(api_key='<my key>') api.geocode("calle tigre 129 cusco") to mongodb server, like I created a collection with this code: from pymongo import MongoClient client = MongoClient('mongodb://<user>:<pass>@ds049219.mongolab.com:49219/<__>') db = client.<__> posts...

MongoLab Delete Multiple collections using HTTP PUT via CURL/Golang-http not working

mongodb,curl,go,mongolab
Im trying to delete multiple Documents in a collection in my MongoDb database hosted in MongoLab Services via their HTTP interface . Here is the CURL request i'm using in trying to achieve it curl -H "Content-Type: application/json" -X PUT "https://api.mongolab.com/api/1/databases/mydb/collections/mycoll?q={\"person\":\"554b3d1ae4b0e2832aeeb6af\"}&apiKey=xxxxxxxxxxxxxxxxx" I essentially want all the documents with the matching...

MongoDB Cloud Deployment - High TTFB

node.js,mongodb,amazon-web-services,deployment,mongolab
I am building a mobile only application in Node.js + MongoDB. I have deployed my server in the AWS AP-Southeast-1 Region. Since I am new to MongoDB, I am leveraging cloud hosting services like MongoLabs, Compose.IO, MongoDirector (testing a few out). Now, these cloud hosting platforms are deploying my database...

Override Hibernate OGM user type restriction?

java,mongodb,jpa,mongolab,hibernate-ogm
I recently created an mongolab account on a sandbox platform (so no admin priviledges). I have a simple testcase application to integrate Hibernate OGM + JPA 2.1 with my mongo database. When i try to run my application i get the following error(singnificant part): Caused by: com.mongodb.CommandFailureException: { "serverUsed" :...

2-line NodeJS application crashes on mongoose.connect() while trying to connect to a mongolab MongoDB database

windows,node.js,mongodb,mongoose,mongolab
I have the following NodeJS code: var mongoose = require('mongoose'); mongoose.connect('mongodb://dev:[email protected]:31632/mongodev'); And upon running it with node server.js, it hangs up for a few seconds and throws the following: C:\Users\dev\work\code\local\nodejsplayground\restwithmongo\nod dules\mongoose\node_modules\mongodb\lib\server.js:228 process.nextTick(function() { throw err; }) ^ Error at Object.<anonymous> (C:\Users\dev\work\code\local\nodejsp...