move mongodb lib to a seperate dir
added a route for db query, further AJAX interface