title: Separating Express.js server and client projects
body: <p>I'm a beginner in Node.js and I have implemented an express app with both client module and server module as a part of single project. I start server by calling</p>
  
  <pre><code>node server.js
  </code></pre>
  
  <p>I'm using express.static to refer to the client code and getting index.html of client.</p>
  
  <pre><code>app.use(express.static(__dirname + "/client"));
  </code></pre>
  
  <p>Now, what if I don't want client and server to be a part of same project? How should the express.static statement be written? Client's project can be located in some other directory and "__dirname" would not work in that case. How should client and server be made independent of each other's directory location?</p>