title: NodeJS + expressJS: server-side vs. client-side html rendering
body: <p>I am new to nodejs and a little confused about the distinction between the server and client side html pages. My goal is to build an e-commerce web store for practice. The stack that I want to try is NodeJS + Express + MongoDB + AngularJS. The basic structure I have right now is as below.</p>
  
  <pre><code>shoppingMall
  ..bin
  ..data
  ..node_modules
  ..public
  ....images
  ....javascripts
  ....stylesheets
  ..routes
  ....index.js
  ....users.js
  ..views
  ....index.jade
  ....layout.jade
  ..app.js
  ..package.json
  </code></pre>
  
  <p>Here is my logic. The files inside <code>views</code> are html pages that are rendered from server. Javascript files inside <code>public/javascripts/</code> are rendered on client. I have to include <code>AngularJS</code> inside <code>layout.jade</code>, and any client code related to the index page should go to <code>public/javascripts/index.js</code> and I must include this file from <code>index.jade</code>. Then, the html page is rendered from server using a jade template engine, and any further user interaction is done from client. Any server-side logic related to <code>index.jade</code> must go to <code>routes/index.js</code> and the code that lives inside this file will not be shown to client.</p>
  
  <p><strong>Q1. Is my logic correct?</strong></p>
  
  <p><strong>Q2. Assuming I am trying to keep it up as an MVC structure, which parts correspond to M, V, C in this case?</strong></p>