Working messy server serving mongoDB data through http using JSON

TODO : cleanup and comment