Simple example - Node.js, Restify, MongoDb and Mongoose

Simple is a relative term. It may seem simple compared to the complexity of the end application or building anything with Java but to the n00b developer it will most likely be pretty challenging and the concepts are difficult to wrap your head around. I wanted to learn how to create a server with node that could serve up html, css, js, and then persist data to mongodb. I imagine you are here for a similar reason.

Check list

  1. Have you installed and started mongodb in your terminal window? type: mongod
  2. Have you opened a second terminal window and created a sample message in the messages collection of your local mongodb database?
  3. After creating a sample message, you should start your server.js by typing: node server

Messages

If you start to see your messages build up in the Message box above, congratulations! You've successfully setup this simple demo.