title: Node.js as gateway
body: <p>I am thinking of using node.js as a gateway. I want to implement several frontends (browser, apps etc.) which get served by node.js with data over websockets. Node.js cannot fetch this data directly from a database but node.js should get it from a backend through an interface which makes it easy to replace the backend. So I was thinking of using a restful layer or a publish /subscribe protocol like MQTT as interface. 
  Ok ... question: Is this a good idea? Can node.js act as a gateway and what modules do you recommend for such a purpose?
  <img src="https://i.stack.imgur.com/OODYR.png" alt="enter image description here"></p>