https://github.com/deepstreamio/deepstream.io-storage-mongodb
A deepstream.io storage connector for MongoDb
https://github.com/deepstreamio/deepstream.io-storage-mongodb
Last synced: 11 months ago
JSON representation
A deepstream.io storage connector for MongoDb
- Host: GitHub
- URL: https://github.com/deepstreamio/deepstream.io-storage-mongodb
- Owner: deepstreamIO
- License: other
- Created: 2015-01-13T13:25:52.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T05:06:09.000Z (about 3 years ago)
- Last Synced: 2024-11-07T08:51:16.403Z (over 1 year ago)
- Language: TypeScript
- Size: 260 KB
- Stars: 23
- Watchers: 14
- Forks: 20
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# deepstream.io-storage-mongodb [](https://badge.fury.io/js/%40deepstream%2Fstorage-mongodb)
[deepstream](http://deepstream.io) storage connector for [mongodb](https://www.mongodb.org/)
This connector uses [the npm mongodb package](https://www.npmjs.com/package/mongodb). Please have a look there for detailed options.
## Basic Setup
```yaml
plugins:
storage:
name: mongodb
options:
connectionString: ${MONGODB_CONNECTION_STRING}/someDb
defaultCollection: 'someTable'
splitChar: '/'
```
```javascript
var Deepstream = require( 'deepstream.io' ),
MongoDBStorageConnector = require( 'deepstream.io-storage-mongodb' ),
server = new Deepstream();
server.set( 'storage', new MongoDBStorageConnector( {
connectionString: 'mongodb://test:test@paulo.mongohq.com:10087/munchkin-dev',
splitChar: '/'
}));
server.start();
```