mac os x에서 couchbase server 써 보기 Web backend

mac os x에서 써 보기

에서 서버를 받으면 쉽게 설치할 수 있다.
Applications directory에 넣고 실행하기.

insert, delete는 
http request를 해야 하는 것 같다.

Querying Using the REST API

Querying can be performed through the REST API endpoint. The REST API supports and operates using the core HTTP protocol, and this is the same system used by the client libraries to obtain the view data.

Using the REST API you can query a view by accessing any node within the Couchbase Server cluster on port 8092. For example:

GET http://localhost:8092/bucketname/_design/designdocname/_view/viewname

가 기본으로 들어 있네.

bucket, view 용어를 좀 알아야겠네.

언어 sdk를 쓰는 게 편하겠다.

처음에는 document를 보기


This gem depends libcouchbase. In most cases installing libcouchbase doesn't take much effort.

MacOS (Homebrew)

$ brew install libcouchbase

샘플은 getting started를 보기
8091 port에서 설정을 하고 나면, sample data를 볼 수 있다.
PortDescriptionNode to NodeNode to ClientCluster AdministrationXDCR (version 1)XDCR (version 2)
8091Web Administration PortYesYesYesYesYes
8092Couchbase API PortYesYesNoYesYes

Documents Filter

Lookup Id

Create Document












{ "name": "21st Amendment Brewery Cafe", "city": "San Francisco", "state": "California", "code": "94107", "country": "United States", "phone": "1-415-369-0900", "website": "", "type": "brewery", "updated": "2010-10-24 13:54:07", "description": "The 21st Amendment Brewery offers a variety of award winning house made brews and American grilled cuisine in a comfortable loft like setting. Join us before and after Giants baseball games in our outdoor beer garden. A great location for functions and parties in our semi-private Brewers Loft. See you soon at the 21A!", "address": [ "563 Second Street" ], "geo": { "accuracy": "ROOFTOP", "lat": 37.7825, "lon": -122.393 } }


Edit Document


{ "name": "21A IPA", "abv": 7.2, "ibu": 0, "srm": 0, "upc": 0, "type": "beer", "brewery_id": "21st_amendment_brewery_cafe", "updated": "2010-07-22 20:00:20", "description": "Deep golden color. Citrus and piney hop aromas. Assertive malt backbone supporting the overwhelming bitterness. Dry hopped in the fermenter with four types of hops giving an explosive hop aroma. Many refer to this IPA as Nectar of the Gods. Judge for yourself. Now Available in Cans!", "style": "American-Style India Pale Ale", "category": "North American Ale" }


sync gateway는 couchbase mobile page에서 받는다.
받아서 그냥 실행하면 되는 것 같다.

Starting Sync Gateway

You start Sync Gateway by running sync_gateway with the -url option. The argument for the -url option is the HTTP URL of the Couchbase server to which you want Sync Gateway to connect. If you do not include any additional command-line options, the default values are used.

The following command starts Sync Gateway on port 4984, connects to the default bucket named sync_gateway in the Couchbase Serving running on localhost, and starts the admin server on port 4985.

$ ./sync_gateway -url http://localhost:8091

If you used a different name for the Couchbase Server bucket or want to listen on a different port, you need to include those parameters as command-line options. For information about the available command-line options, see Administering Sync Gateway.

couchbase server community edition이 무료이고, sync gateway까지 쓸 수 있네.
amazon에서 쉽게 쓸 수 있겠다. 그런데, EC2하나를 할당해야 하니, EC2 값이 하나가 나오겠다.

Version 1.0-Beta2 | 
Sold by Couchbase
$0.00/hr for software + AWS usage fees
Couchbase Sync Gateway is a ready-to-go, easy-to-scale sync layer that extends Couchbase Server to facilitate communication between Couchbase Server and your Couchbase ...
Linux/Unix, Amazon Linux 2011.09 | 64-bit Amazon Machine Image (AMI)


댓글 입력 영역