Adding autobind decorator to server

This commit is contained in:
John Lyon-Smith
2018-03-26 11:37:18 -07:00
parent 80c37f8642
commit 49ca7f3bf1
18 changed files with 51 additions and 55 deletions

View File

@@ -2,18 +2,17 @@ import mongoose from 'mongoose'
import mongodb from 'mongodb'
import Grid from 'gridfs-stream'
import merge from 'mongoose-merge-plugin'
import autoBind from 'auto-bind2'
import autobind from 'autobind-decorator'
import * as Schemas from './schemas'
import util from 'util'
Grid.mongo = mongoose.mongo
@autobind
export class DB {
constructor() {
mongoose.Promise = Promise
mongoose.plugin(merge)
autoBind(this)
}
connect(mongoUri, isProduction) {