How can I configure multiple sub domains in Express.js or Connect.js

Or alternatively you could use vhost. Then, create several sites in their own directory and export the express app, eg. /path/to/m/index.js: var app = express() /* whatever configuration code */ exports.app = app // There is no need for .listen() And then handle all requests with the following app: var vhost = require(‘vhost’); express() .use(vhost(‘m.mysite.com’, … Read more