title: Passing data from mongodb to my front end application
body: <p>I have a MongoDB on a web server and I have a Mean stack web application.  Within the MongoDB, I have a bunch of data that I want to pass to my web application.  I have looked into options, but I'm a little unsure as to which route to take to make this happen. I have considered using socket.io to set up a listener on my web server to open up a connection with my DB, and then making an API call or direct DB connection to return my data.</p>
  
  <p>I should add that my app is based on the mean.io boilerplate code.</p>
  
  <p>My question is where within my stack do I need to put the socket.io code? </p>
  
  <p>Would it be wise to include the socket.io code at the root of my application or only in the packages/modules that require the data to be passed from my web server to my application?</p>
  
  <p>And finally, is socket.io even the preferred route to take? Is there another method to achieve this that makes more sense such as express.js?</p>