Skip to content

ricardolonga/beersample-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Couchbase Beer Tutorial

This tutorial uses Go in combination with Couchbase Server to display and manage beers and breweries found in the beer-sample dataset.

Quick Start

Install Couchbase Server: http://www.couchbase.com/download

During initial configuration load beer-sample dataset. It could be also loaded later if your node/cluster has free space. More info http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-sampledata-beer.html

Add two more views to your bucket. To save prevous design documents you should first copy your design document from "Production Views" tab to "Development Views", update it and publish back to production. Here are two new views you need:

  • Design document: _design/beer. View: by_name
function (doc, meta) {
  if(doc.type && doc.type == "beer") {
    emit(doc.name, null);
  }
}
  • Design document: _design/brewery. View: by_name
function (doc, meta) {
  if(doc.type && doc.type == "brewery") {
    emit(doc.name, null);
  }
}

Clone this repo:

$ git clone git://github.com/couchbaselabs/beersample-go.git
Cloning into 'beersample-go'...

Run the application.

$ go run
Starting server on :9980

Navigate to http://localhost:9980/welcome.

About

The Couchbase beer-sample example for Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 47.9%
  • HTML 38.5%
  • JavaScript 10.7%
  • CSS 2.9%