Skip to content

Instantly share code, notes, and snippets.

@finnp
Created December 21, 2016 14:08
Show Gist options
  • Save finnp/8d28bd39813cf5597544ef986daca05c to your computer and use it in GitHub Desktop.
Save finnp/8d28bd39813cf5597544ef986daca05c to your computer and use it in GitHub Desktop.
var Hapi = require('hapi')
var hoodie = require('hoodie').register
var server = new Hapi.Server()
server.connection({
host: 'localhost',
port: 8080
})
server.register({
register: hoodie,
options: { // pass options here
db: {
url: 'https://test:test@localhost:5984',
},
public: 'public'
}
}, function (error) {
if (error) {
throw error
}
server.start(function (error) {
if (error) {
throw error
}
console.log('Server running at:' + server.info.uri)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment