title: Separating RESTful services from main web site architecture using Node.js
body: <p>I'm starting a new project and I'd like opinions on my idea for a server architecture. Here's the setup:</p>
  
  <ol>
  <li><p>There is a client app on many devices (phones, tablets). These all need to make RESTful connections to a server for data. This server already exists and is running Node.js and Express to serve JSON.</p></li>
  <li><p>I need to build a customer website that needs access to the same data as the other client devices. Users will log into this web site, interact with their account, etc. This server could run Node.js, Apache, or whatever works.</p></li>
  </ol>
  
  <p>It seems to make the most sense to me to keep the RESTful server completely stateless and truly only answer web service requests. This means that I'll need to use a separate server (or drone) to run the web site, and to treat this server as another client to the RESTful server.</p>
  
  <p>Am I overcomplicating this? Does it makes sense to just serve JSON (for the devices) and HTML (for browsers) from the same server, and to introduce user session state into that server?</p>