title: where to code business logic in nodejs with expressjs, mongoosejs and redis
body: <p>My business logic includes mongodb operations and redis operations on one request. I do not know where we should put logic code to. In Java project, we have <strong>DAO</strong>, <strong>service</strong> and <strong>controler</strong> objects. but in nodejs projects, I don't know where to put my code. shall I put logic code to <code>routes/index.js</code>?</p>
  
  <pre><code>app.post('/deal', function(req, res) {
      ... //TODO: here
  
  });
  </code></pre>
  
  <p>or create a kind of <strong>service objects</strong> such as what we do in Java proejct?</p>