mongohq

angularJS $http.Post not working: Failed to load resource: Request header field 0 is not allowed by Access-Control-Allow-Headers

狂风中的少年 提交于 2020-01-06 10:53:45
问题 I'm using $http to post some data to my data base. Here is the documentation of the database. I use it on my terminal and it works. Here's the error message I got from Safari's console: 1)Failed to load resource: Request header field 0 is not allowed by Access-Control-Allow-Headers. (seems to be sensed by the database) 2)XMLHttpRequest cannot load https://beta-api.mongohq.com/mongo/MyDId/myDatabse/collections/myCollection/documents. Request header field 0 is not allowed by Access-Control

MongoCollection::aggregate() is undefined in Heroku PHP using MongoHQ

扶醉桌前 提交于 2019-12-25 01:50:02
问题 I'm getting the following error when using MongoDB's aggregate() function in a PHP code. This code perfectly works on my local setup which is running MongoDB 2.2.3 PHP Fatal error: Call to undefined method MongoCollection::aggregate() in /app/www/page.php on line 52, referer: http://referrer.url Code foreach($cats as $key=>$val){ $cats2[$val['lable']] = $myCollection->aggregate( array( array('$match' => array('user_id' => $user_id )), array('$unwind' =>"\$data"), array('$match' => array('data

Unable to connect to mongohq at heroku using shell

帅比萌擦擦* 提交于 2019-12-24 05:06:04
问题 I installed mongohq:sandbox at Heroku. When I want to connect to mongo, it occurs an error: mongo linus.mongohq.com:10123/app10575123 -u my_user -p pwd123 MongoDB shell version: 2.2.2 connecting to: linus.mongohq.com:10123/app10575123 > show dbs Wed Jan 9 06:00:50 uncaught exception: listDatabases failed:{ "errmsg" : "need to login", "ok" : 0 } Login and password are correct. 回答1: You are connected to the database, but for the shared database plans at MongoHQ (especially the sandbox ones),

Unable to connect to mongohq at heroku using shell

走远了吗. 提交于 2019-12-24 05:05:44
问题 I installed mongohq:sandbox at Heroku. When I want to connect to mongo, it occurs an error: mongo linus.mongohq.com:10123/app10575123 -u my_user -p pwd123 MongoDB shell version: 2.2.2 connecting to: linus.mongohq.com:10123/app10575123 > show dbs Wed Jan 9 06:00:50 uncaught exception: listDatabases failed:{ "errmsg" : "need to login", "ok" : 0 } Login and password are correct. 回答1: You are connected to the database, but for the shared database plans at MongoHQ (especially the sandbox ones),

Unable to connect to mongohq at heroku using shell

牧云@^-^@ 提交于 2019-12-24 05:05:22
问题 I installed mongohq:sandbox at Heroku. When I want to connect to mongo, it occurs an error: mongo linus.mongohq.com:10123/app10575123 -u my_user -p pwd123 MongoDB shell version: 2.2.2 connecting to: linus.mongohq.com:10123/app10575123 > show dbs Wed Jan 9 06:00:50 uncaught exception: listDatabases failed:{ "errmsg" : "need to login", "ok" : 0 } Login and password are correct. 回答1: You are connected to the database, but for the shared database plans at MongoHQ (especially the sandbox ones),

MongoDB won't connect to MongoHQ using Mongoid

拜拜、爱过 提交于 2019-12-20 02:32:36
问题 I've just started a brand new rails project and the first task I'm trying to complete is creating an object and having it save within my database. I went through the automated way of generating an object, in this case a URL object as follows: rails generate scaffold Url domain:string I've also tested out two separate mongoid.yml configuration settings. The first is as follows: development: sessions: default: # Defines the name of the default database that Mongoid can connect to. # (required).

Meteor UP to deploy meteor app. Issues with remote DB url?

妖精的绣舞 提交于 2019-12-12 03:41:54
问题 I'm trying to use Meteor Up: https://github.com/arunoda/meteor-up There is a setting in the config file to set the remote MongoDB URL It looks like this: "env": { "PORT": 3000, "ROOT_URL": "http://dev.mysite.com", "MONGO_URL": "mongodb://MyMongoDBUsername:MyMongoHQPassword@troup.mongohq.com:#####/name_of_my_db" }, [##.###.###.##] invoking deployment process: FAILED -----------------------------------STDERR----------------------------------- Warning: Permanently added '##.###.###.##' (RSA) to

“not found” error calling mongohq rest api from windows phone

﹥>﹥吖頭↗ 提交于 2019-12-11 10:36:53
问题 I am having a problem calling the mongohq REST API from a windows phone (7.1) application. I POSTing to a URL of the following form: https://api.mongohq.com/databases/[database]/collections/[collection]/documents?_apikey=XXXXXXXXXXX Exactly the same URL, when called from a browser-based REST client works for both GET and POST requests. But when I POST or GET to that URL from a windows phone app using either HttpWebRequest or WebClient, I get back a weird error that says simply "the server

Node.js - Connecting to MongoDB using MongoHQ on Heroku

北战南征 提交于 2019-12-05 02:04:11
问题 I have a Node.js app using Express that stores data in a mongoDB (locally). It's now pushed to heroku successfully on a cedar stack and the server is running. I added the mongohq addon through the terminal. Now... how do I connect that mongoDB through mongohq to my application to start using it??? I don't see a tutorial for this anywhere online. If you can point me to one or get me started on where to add the configuration, I would greatly appreciate! Thanks much. Update: I've tried the

Node.js - Connecting to MongoDB using MongoHQ on Heroku

谁都会走 提交于 2019-12-03 16:15:20
I have a Node.js app using Express that stores data in a mongoDB (locally). It's now pushed to heroku successfully on a cedar stack and the server is running. I added the mongohq addon through the terminal. Now... how do I connect that mongoDB through mongohq to my application to start using it??? I don't see a tutorial for this anywhere online. If you can point me to one or get me started on where to add the configuration, I would greatly appreciate! Thanks much. Update: I've tried the following (with real values for MYPASSWORD and MYDBNUMBER: in routes.js var db = mongoose.connect('mongodb:/