binder-project/binder-db

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

:dash: :dash: The Binder Project is moving to a new repo. :dash: :dash:

: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.

:dash: :dash: The Binder Project is moving to a new repo. :dash: :dash:

binder-db

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
install binder-db
api
getDatabase(cb)

Returns a Mongoose db wrapper that's connected to the main Binder database

usage
getDatabase = require('binder-db')
atabase(function (err, db) {
 register models with the db, etc.

examples
getDatabase = require('binder-db')
atabase(function (err, db) {
lf.db = db
lf.buildInfo = db.model('Build', BuildInfoSchema)
lf.templates = db.model('Templates', registry.TemplateSchema)


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.