Posts

Showing posts from June, 2012

A Simple MongooseJs Example

As my latest coding adventure I've decided to give node.js a try.  I read this short little tutorial name the Node Beginner Book.  I went through the entire book in one day.  The book provided me with enough knowledge to be able to produce simple website.   The good accomplished its goal but it did not cover database communications.  I can't think of any business application that does not communicate with some sort of database for storage.

I'd heard that a good choice for using for storage with node.js is MongoDb.  Being that I am totally unfamiliar with MongoDb I did a quick google search and found a driver that can be used to connect node source code to MongoDb.  That driver is called mongoosejs.

So now that I knew all the components to have a database with node I decided to try to connect all the pieces together.  I gotta say that it was not easy for various reasons.  The mongoosejs site was inadequate for me.  It may be totally appropriate for someone who knows the ins…