title: Node.js multi package project?
body: <p>I'm new to Node, coming from a Java background. These days I'm experimenting with each part of a full application: database, rest api, ui.</p>
  
  <p>So far I wrote the database-backed logic, which runs on its own, processes text files, store data about them in the database and exposes a REST API to query that data. I'm now going to make the ui to navigate that data.</p>
  
  <p>Would it be reasonable having a structure like this:</p>
  
  <pre><code>- (a) main project folder
      - (b) backend application (a Restify server responds to REST calls querying the database)
      - (c) ui application (an http server serves React static files)
  </code></pre>
  
  <p>If that makes sense, I would guess that:</p>
  
  <ul>
  <li>(b) has a <code>package.json</code> with server- and rest- related dependencies (i.e. Restify, MongoDB, ...)</li>
  <li>(c) has another <code>package.json</code> with dependencies for ui (i.e. React, Webpack, etc, but not Restify or MongoDB)</li>
  <li>(a) has a third <code>package.json</code> which cares for installing each sub-project (I'd say by running <code>npm install</code> through hand-written <em>npm-scripts</em>).
  Otherwise, how do you usually handle such Node projects? Do you keep each application completely separate from the rest?</li>
  </ul>
  
  <p>For those who know that tool, this mimics a Maven multi-module project; though that level of automation is not needed, I'd just like to come up with a self-contained package.</p>