LDP on CouchDB
Apache CouchDB's HTTP API is quite similar to LDP's Basic Container system.
This project closes the loop by providing a set of CouchApp
functions (_update
, _show
, etc) that add the remaining
LDP specific semantics.
Usage
npm install && npm install -g gulp
- Copy
config.json.sample
toconfig.json
- Change
config.json
to match your setup. gulp
(or onlygulp apps
orgulp docs
)- Send LDP requests to the URL you set in
config.json
plus_design/ldp/_rewrite/
- (optional) Setup a Virtual Host to make the URL above prettier.
Sample Requests
Assuming your setup matches mine
- http://localhost:5984/ldp-on-couchdb/_design/ldp/_rewrite/
- returns a Turtle representation of the Basic Container (which references the documents contained in this container.
- http://localhost:5984/ldp-on-couchdb/_design/ldp/_rewrite/a
- returns a JSON-LD representation of the
a
document + the Web Annotation Data Model JSON-LD Context.
- returns a JSON-LD representation of the
License
Apache License 2.0