Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

update for example app to run with mongoDB and mongoHQ #1

Merged
merged 1 commit into from Apr 9, 2012

Conversation

Projects
None yet
3 participants
Contributor

MichaelMartinez commented Apr 9, 2012

No description provided.

@anatoliychakkaev anatoliychakkaev commented on the diff Apr 9, 2012

README.md
@@ -14,4 +14,35 @@ railway seed
node server.js
```
+## to get started with MongoDB and MongoHQ
+
+```
+git clone git://github.com/anatoliychakkaev/railway-example-app.git lib-app
+cd lib-app
+npm install -l
+npm install mongodb
+npm install mongoose
@anatoliychakkaev

anatoliychakkaev Apr 9, 2012

Owner

it's not necessary to install both mongodb and mongoose. I recommend to use mongodb only

@anatoliychakkaev anatoliychakkaev commented on the diff Apr 9, 2012

README.md
+## to get started with MongoDB and MongoHQ
+
+```
+git clone git://github.com/anatoliychakkaev/railway-example-app.git lib-app
+cd lib-app
+npm install -l
+npm install mongodb
+npm install mongoose
+```
+
+Then modify 'database.json' as follows;
+
+```
+{ "development":
+{
+ "driver": "mongoose",
@anatoliychakkaev

anatoliychakkaev Apr 9, 2012

Owner

better to use mongodb native driver, it's much faster

Contributor

MichaelMartinez commented Apr 9, 2012

let me test again as I remember several errors. I will let you know soon.

Contributor

MichaelMartinez commented Apr 9, 2012

First message after I changed database.json to driver mongodb

michaelmartinez in ~/Sites/nodewebtests/lib-app on master !
± node server.js                                                                                                                                                                                                                      14:49
Run "npm install mongodb" command to use jugglingdb using this database engine

npm install mongodb -l

App starts but it hangs on this route; localhost:3000/books.
Eventually the whole thing times-out with Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.

Running with Mongoose fixes this and the app runs perfectly.

Owner

anatoliychakkaev commented Apr 9, 2012

what is your config/database.json for this driver? for me it works for:

{ "development":
{ "driver": "mongodb"
, "url": "mongodb://localhost/myapp_test11"
}
, "test":
{ "driver": "memory"
}
}

On Tue, Apr 10, 2012 at 1:57 AM, Michael Martinez <
reply@reply.github.com

wrote:

First message after I changed database.json to driver mongodb

michaelmartinez in ~/Sites/nodewebtests/lib-app on master !
 node server.js


   14:49
Run "npm install mongodb" command to use jugglingdb using this database
engine

npm install mongodb -l

App starts but it hangs on this route; localhost:3000/books.
Eventually the whole thing times-out with Error 324
(net::ERR_EMPTY_RESPONSE): The server closed the connection without sending
any data.

Running with Mongoose fixes this and the app runs perfectly.


Reply to this email directly or view it on GitHub:

#1 (comment)

Cheers,
Anatoliy Chakkaev
web-developer [js, rails, php]
+7.917.857.858.4

Contributor

MichaelMartinez commented Apr 9, 2012

Its in the readme I updated, look at the full commit. Its a connection to mongohq which I suspect may be the problem with the mongodb adapter in jugglingdb. I haven't been able to use "mongodb" as a driver for any of my projects.

1602 commented Apr 9, 2012

Okay, got it. Need to investigate mongohq issue. I plan to focus on mongodb instead of mongoose which is too heavy. Thanks for spotting!

Contributor

MichaelMartinez commented Apr 9, 2012

Sounds good! In the meantime, if people want to use mongohq... these instructions work.

@anatoliychakkaev anatoliychakkaev pushed a commit that referenced this pull request Apr 9, 2012

Anatoliy Chakkaev Merge pull request #1 from MichaelMartinez/master
update for example app to run with mongoDB and mongoHQ
fb31864

@anatoliychakkaev anatoliychakkaev merged commit fb31864 into anatoliychakkaev:master Apr 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment