Created
December 21, 2016 14:08
-
-
Save finnp/8d28bd39813cf5597544ef986daca05c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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