Name: binder-db
Owner: Binder
Description: Node module containing functions for consistent database access across the 3 main Binder modules (and maybe some JSONSchemas)
Created: 2016-01-11 01:34:52.0
Updated: 2016-01-12 01:09:51.0
Pushed: 2017-08-18 02:49:26.0
Homepage: null
Size: 7
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
:books: Same functionality. Better performance for you. :books:
Over the past few months, we've been improving Binder's architecture and infrastructure. We're retiring this repo as it will no longer be actively developed. Future development will occur under the JupyterHub organization.
Thanks for updating your bookmarked links.
Functions for consistent database access across from all Binder modules
All Binder modules expect to have access to a writable MongoDB instance. The db
service provided by binder-control
, started with binder-control start-service db
will launch a Docker container with a preconfigured Mongo instance (and configurable properties in binder-control
).
All configuration options are in conf/main.json
.
ew@binder-api:~/binder-db$ cat conf/main.json
ost": "localhost",
ort": 9050,
b": "binder"
install binder-db
Returns a Mongoose db wrapper that's connected to the main Binder database
cb
function - callback(err, db)getDatabase = require('binder-db')
atabase(function (err, db) {
register models with the db, etc.
getDatabase = require('binder-db')
atabase(function (err, db) {
lf.db = db
lf.buildInfo = db.model('Build', BuildInfoSchema)
lf.templates = db.model('Templates', registry.TemplateSchema)