Skip to content

Commit

Permalink
fix: conditional server.register of h2o2 plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Dec 4, 2016
1 parent a185f12 commit 6984588
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ function hapiCouchDbStore (server, options, next) {
if (api.adapter === 'http') {
// workaround for https://github.com/pouchdb/pouchdb/issues/5548
var couchDbUrl = toCouchDbUrl(new options.PouchDB('hack', {skip_setup: true}).__opts)
server.register(require('h2o2'))
server.register({
register: require('h2o2'),
once: true
})
} else {
var xapp = require('express-pouchdb')(options.PouchDB, {
mode: 'minimumForPouchDB'
Expand Down

0 comments on commit 6984588

Please sign in to comment.