Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

mongoose-ssh

littledumb1.6kMIT0.1.0

Mongoose through ssh-tunnel

mongoose, ssh tunnel

readme

Mongoose-Ssh

Mongoose through ssh tunnel.

XO code style

Install

npm install --save mongoose-ssh

Usage

const mongoose = require('mongoose-ssh');

mongoose.connect(
  {
    host: 'ssh-server-host',
    port: 'ssh-server-port',
    dstHost: 'destination-host',
    dstPort: 'destination-port',
    localHost: 'local-host',
    localPort: 'local-port',
    username: 'ssh-username',
    privateKey: 'ssh-private-key'
  },
  'mongodb://dbUsernam:dbPassword@localhost/dbname'
);

See test.js for more details.

License

MIT

References