Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A MarkLogic rewrite Sample Application: CouchDB Facade

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 config
Octocat-spinner-32 lib
Octocat-spinner-32 models
Octocat-spinner-32 resource
Octocat-spinner-32 static
Octocat-spinner-32 views
Octocat-spinner-32 LICENSE
Octocat-spinner-32 NOTICE
Octocat-spinner-32 README.md
Octocat-spinner-32 error.xqy
Octocat-spinner-32 rewrite.xqy
README.md

facade

facade is a rewrite sample application. It exposes MarkLogic Server by implementing a small subset of the CouchDB HTTP API. The objective of facade is to demonstrate how to use rewrite to create a JSON backed web-service. Simple decisions were made in implementing the service and it should not be regarded as an real MVC implementation. In fact the code needs serious refactoring.

In the future facade could be used as a compatibility layer between MarkLogic Server and CouchDB, leveraging drivers and replication amongst each other. At this point that is not the objective of the project.

facade includes futon which is part of CouchDB. A small fix to support multiple versions of attachments was applied.

Usage

Create a MarkLogic HTTP AppServer and configuration make rewrite.xqy the default rewriter script.

You can now visit create databases and documents using futon by accessing /_utils/ (e.g. localhost:8953/_utils/)

This section doesn't cover how to set up an HTTP Application Server in MarkLogic. If you are a beginner I suggest you start by browsing the MarkLogic Developer Community site or sign up for training.

Contribute

Think the documentation sucks? Think the performance is crap? Think facade is cool but is missing feature X? Then contribute to the project.

  1. Message dscape on github talking about what you want to accomplish.
  2. Fork facade in github
  3. Create a new branch - git checkout -b my-branch
  4. Develop/fix the functionality
  5. Test your changes
  6. Commit your changes
  7. Push to your branch - git push origin my-branch
  8. Create an pull request

Running the tests

To run the tests simply access /_tests/: (assuming 127.0.0.1 is the host and 8090 is the port)

http://127.0.0.1:8090/_tests/

Make sure all the tests pass before sending in a pull request!

Report a bug

If you want to report a bug please file a issue.

Meta

(oO)--',- in caos

Something went wrong with that request. Please try again.