Skip to content
mikedeboer edited this page Feb 24, 2013 · 3 revisions

CardDAV

Installation

Since version 0.3.0, jsDAV ships with a CardDAV plugin. CardDAV allows for addressbook-syncing functionality in jsDAV.

Database setup

jsDAV prefers NoSQL database like Redis or Mongo to store address books and cards. These two are officially supported.

This example assumes you're using Redis, which is the default database used by jsDAV.

Make sure your Redis server is running:

$> redis-server

Run the example script

Simply execute the following on the command line:

$> node examples/addressbookserver.js

If you need to change the options to connect to your Redis server, open the example script and read the inline documentation, which tells you where to enter your options.

Test in browser

Try opening the full url to your new server. Make sure you append a slash at the end of the url, without this the request will fail. Example:

http://localhost:8000/

This url should prompt you with an authentication dialog. The default username and password are admin and admin.

Get clients working

CardDAV is a lot newer than CalDAV, and from what we've noticed so far, clients can be a bit more error-prone.

OS X was one of the first clients to support it (in 10.6). Although the client has gotten a LOT better, especially the client shipped in 10.6 has a ton of problems.

Read OSXAddressbook for more information.

Adding users

jsDAV does not provide an administrative interface. While this may happen in the future, for now jsDAV is mostly intended for developers. Adding new users is done directly on the database.

In order to allow a user to log in, add them to the users table. You must also add them to the principals table to enable addressbook access.

See also

Based on the original document at http://code.google.com/p/sabredav/wiki/

Clone this wiki locally