vhoster
Developing multiple applications for different domains on one hosting using a single node.js instance.
Universal server for sites node.js with virtual hosts.
The common libraries located at the top level and are available to all sites.
Connected sites must contain the root file .index.js.
Each site determines its own relative paths.
Installation
$ npm install vhoster
Usage
$ vhoster --helpUsage: vhoster [options]Options:-h, --help output usage information-V, --version output the version number-n [host] hostname for subdomains [localhost]-s <path> path to subdomains-d <path> path to domains--port <port> server port [3000]--host <host> server hostnameExamples:$ vhoster -n you-host-name.com -s /var/www/subdomains/ -d /var/www/domains/$ vhoster -s /var/www/subdomains/ -d /var/www/domains/$ vhoster -d /var/www/domains/ --port 8000 --host 0.0.0.0$ vhoster -s /var/www/subdomains/
Example .index.js
With http module:
var http = ;exportsapp = http;
Or you can use connect or express:
var connect = ;exportsapp =;