Adding server code for displaying data from the mongodb