MongoDB class

Leave a comment

Hey guys! Since we started with the MongoDB course. Just saw the first video, which has some writing code in it, so I thought, I will write some, since ❤ ruby ❤
The link for the class video is – link. You can go ahead have a look and see, what it does. I just wrote a similar code which lets us do the same thing in ruby. Using sinatra( bottle is being used with python in the video)

# Steps
# 1. Install the gem sinatra
gem install sinatra
# you you skip rdoc and ri using
# gem install sinatra --no-rdoc --no-ri
view raw install_gem.sh hosted with ❤ by GitHub
# hello_world.rb
# This will manage routes and display the content.
# I am sure, you did watch the video before checking this out.
require "sinatra"
set :bind, '127.0.0.1'
set :port, '8080'
get '/hello/:name' do
"Hello #{params[:name]}!"
end
view raw hello_world.rb hosted with ❤ by GitHub
# just simply run the ruby file that we created.
ruby hello_world.rb
view raw run_server.sh hosted with ❤ by GitHub

Thats it folks, we are done. Head over to http”//127.0.0.1:8080/hello/world and see for yourself.

MongoDB courseware

Leave a comment

Hi Guys, Long time no see. Just been busy with some stuff. Today I am going to talk a bit about MongoDB. Well its too much in news, these days, your clients wanting you to use it, people telling you about scalability factors, even if you are just bulding a food recipes site. sigh!

So I thought, I might as well jump onto the bandwagon to learn some mongodb as well. So like fortunately, I found out that 10gen the company behind mongodb is having an online courseware for learning mongodb. So I enrolled with it. Oh Well, yeah its in python, I ❤ ruby. so what? Let me try and have a series of blog posts, with similar code in ruby as is taught in class in the courseware in python. Hope you guys will learns something with me too.

Time to learn 🙂

Don’t forget to check the link