Or, alternatively, you can use vhost .
Then create several sites in your own directory and export the express application, for example. /path/to/m/index.js :
var app = express() exports.app = app
Then process all the requests in the following application:
var vhost = require('vhost'); express() .use(vhost('m.mysite.com', require('/path/to/m').app)) .use(vhost('sync.mysite.com', require('/path/to/sync').app)) .listen(80)
Note that /path/to/m and /path/to/sync can be absolute paths (as mentioned above) or relative paths.
Adrien Apr 26 '11 at 15:09 2011-04-26 15:09
source share