Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Like connect-vhoster, but mounts apps to a path rather than a subdomain
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
example
lib
README.md
package.json

README.md

You give connect-mounter a path to a directory with other directores that contain server.js or app.js and export a connect app, it mounts them according to the name of the directory.

Example

git clone git://github.com/SpotterRF/connect-mounter.git
cd connect/mounter/examples/
ls mounts/
# eggman/ walrus/
node server 4080 &
curl http://localhost:4080/eggman
curl http://localhost:4080/walrus

Usage

npm install mounter

my-mounter.js:

(function () {
  "use strict";

  var mounter = require('connect-mounter')
    , port = process.argv[2]
    , server
    ;

  mounter.create('/path/to/mounts');

  function listening() {
    console.info('Listening on ' + server.address().address + ':' + server.address().port);
  }

  if (port) {
    server = mounter.listen(port, listening);
  } else {
    server = mounter.listen(listening);
  }
}());
Something went wrong with that request. Please try again.