How to develop a multi-tenant application with Node.js (express.js)?

I'm looking for resources on how to write a multi-tenant application in Node.js. Can anyone guide me in the right direction? Thanks.

Here's my technology stack:

  • Node.js
  • Express.js
  • Mocha.js
  • Postgres SQL
  • JavaScript
  • HTML5

a pretty complete StackOverflow answer can be found here:

How to make Node.js Multi-tenant for websites on port 80?

also jackdbernier has a good answer about vhosts within expressJS.