[go: up one dir, main page]

Skip to content

LightKone/antidote-rest-server

Repository files navigation

Version npm Build Status Dependencies Greenkeeper badge

Antidote REST Server

An HTTP/HTTPS REST API for AntidoteDB, written in CoffeeScript.

Installing using NPM

  • $ npm install -g antidote-rest-server
  • $ antidote-rest-server

Installing from Source

  • $ git clone https://github.com/LightKone/antidote-rest-server.git
  • $ cd antidote-rest-server
  • $ npm test (optionally, if you want to check everything is OK)
  • $ npm install
  • $ npm start

Then fire up your browser to localhost:3000

Configuring

Configuration is done through the command line. See below the options and default values.

  • Antidote hostname: --antidote:hostname=localhost
  • Antidote port: --antidote:port=8087
  • REST server port: --webserver:port=3000

A QuickStart Tutorial

There is a small tutorial on the GitHub wiki to help you get started:

REST API

Only implementing a subset of the available CRDTs in Antidote:

PN Counter

  • GET /counter/read/:bucket/:key
  • GET/PUT /counter/increment/:bucket/:key/:amount?

Integer (deprecated)

  • GET /integer/read/:bucket/:key
  • GET/PUT /integer/increment/:bucket/:key/:amount?
  • GET/PUT /integer/set/:bucket/:key/:value

Set

  • GET /set/read/:bucket/:key
  • GET/PUT/POST /set/add/:bucket/:key/:elem
  • GET/DELETE /set/remove/:bucket/:key/:elem

LWW Register

  • GET /register/read/:bucket/:key
  • GET/PUT /register/set/:bucket/:key/:value

MV Register

  • GET /mvregister/read/:bucket/:key
  • GET/PUT /mvregister/set/:bucket/:key/:value