Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danwild/set-connection-options
Meteor set additional mongo connection settings (e.g. sslCert) via $MONGO_CONNECTION_OPTIONS
https://github.com/danwild/set-connection-options
meteor meteor-package meteorjs mongo ssl ssl-certificate ssl-support
Last synced: 4 days ago
JSON representation
Meteor set additional mongo connection settings (e.g. sslCert) via $MONGO_CONNECTION_OPTIONS
- Host: GitHub
- URL: https://github.com/danwild/set-connection-options
- Owner: danwild
- License: mit
- Created: 2017-10-10T22:22:43.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-09-07T14:58:26.000Z (about 3 years ago)
- Last Synced: 2024-06-13T10:44:54.732Z (5 months ago)
- Topics: meteor, meteor-package, meteorjs, mongo, ssl, ssl-certificate, ssl-support
- Language: JavaScript
- Homepage: https://atmospherejs.com/danwild/set-connection-options
- Size: 4.88 KB
- Stars: 2
- Watchers: 1
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# danwild:set-connection-options
Simple Meteor Atmosphere Package to allow you to pass in additional
[connection settings](http://mongodb.github.io/node-mongodb-native/2.1/reference/connecting/connection-settings/)
to Mongo that are not supported by the
[URI Connection String](https://docs.mongodb.org/manual/reference/connection-string/) format.i.e. You can set useful things like `ssl`, `sslCA`, `sslCert`, `connectTimeoutMS`, `authSource` etc.
## Notes
* Requires Meteor v1.4+, it uses the
[Mongo.setConnectionOptions](https://github.com/meteor/meteor/pull/7277) method (thanks [@dburles](https://github.com/dburles))## Use
1. `meteor add danwild:set-connection-options`
2. Open your `.meteor/packages` file, and place `danwild:set-connection-options` at the top of the package list
(to ensure connection options are set prior to other packages using Mongo).
3. Simply pass your settings to the env var `MONGO_CONNECTION_SETTINGS`, e.g.
```shell
export MONGO_CONNECTION_OPTIONS='{ "foo": "bar" }
```If the env var is not set on startup, the package does nothing.