/cope-api

Primary LanguageJavaScriptEuropean Union Public License 1.1EUPL-1.1

Integration Layer

Requirements

  • Node.js >= v4
  • npm >= v3.3.x
  • CouchDB 1.6.1

Setup

Clone the project and then run the following command in order to get a working build environment.

npm install

Also don't forget to start your CouchDB server.

Configuration

The default configuration can be found in config.dist.json. You can override it by creating a local config.json.

Build

If you want to build the whole project, run the two following commands. Otherwise, see further explanations.

npm run build
npm run push

Facade

Following the facade design pattern, all the api is described here with the routing.

npm run build:facade
npm run push:facade

Display

npm run build:service-display
npm run push:service-display

Document

Responsible for the storage of documents, CRUD operations.

npm run build:service-document
npm run push:service-document

Notification

Provide push notifications for document consumers.

npm run build:service-notification
npm run push:service-notification

Redirection

npm run build:service-redirection
npm run push:service-redirection

Remote browser

npm run build:service-remote-browser
npm run push:service-remote-browser

Types

Provide list of types and json schema

npm run build:facade
npm run push:facade

Usage

To start, follow the route exposed by the facade. By default, it should be http://localhost:5984/ilayer/_design/facade/_rewrite/beta