I am running an express app on node.js. The app uses the express-subdomain module to help handle routes for two different subdomains (sub1.example.com and sub2.example.com). I\'
I'm the author of the module :)
For each new subdomain you wish to test locally you must add into your /etc/hosts file. So for example:
localhost is:
127.0.0.1 localhost
a new subdomain would be..
127.0.0.1 sub1.localhost
and another..
127.0.0.1 sub2.localhost
Check out what I have done in the tests.