Discover Packages 
           
        
          
            fuchsia.googlesource.com/third_party/github.com/googleapis/google-cloud-go.git 
           
        
          
            examples 
           
        
          
            bigtable 
           
        
        
          
            usercounter
           
          
            
               
             
          
        
       
     
   
  
    
  
    
       
     
    
    
      command 
    
    
      
        
           
         
      
    
   
    
      
  
    
      
  
    
      Version:  
        v0.6.0
     
    
      Opens a new window with list of versions in this module.
    
    
    
   
      
  
    Published: Dec 10, 2016
   
      
  
    License: Apache-2.0 
      
    
   
  
    Opens a new window with license information.
  
      
        
  
    
      Imports:  10
     
   
  
    Opens a new window with list of imports.
  
        
  
    
       Imported by:  0
     
   
  
    Opens a new window with list of known importers.
  
      
    
   
  
  
    
   
 
    
      
    
    
  
  
    
      
        
          README 
        
       
     
  
 
    
  
    
      
        
  
    
       
      README
      ¶ 
     
    
      
        User Counter 
(Cloud Bigtable on Managed VMs using Go) 
This app counts how often each user visits. The app uses Cloud Bigtable to store the visit counts for each user.
Prerequisites 
Set up Cloud Console. 
Go to the Cloud Console  and create or select your project.
You will need the project ID later. 
Go to Settings > Project Billing Settings  and enable billing. 
Select APIs & Auth > APIs . 
Enable the Cloud Bigtable API  and the Cloud Bigtable Admin API .
(You may need to search for the API). 
Set up gcloud. 
gcloud components update 
gcloud auth login 
gcloud config set project PROJECT_ID 
Download App Engine SDK for Go. 
go get -u google.golang.org/appengine/... 
In main.go, change the project and instance constants. 
 
Running locally 
From the sample project folder, dev_appserver.py app.yaml. 
 
Deploying on Google App Engine flexible environment 
Follow the deployment instructions .
 
       
      Expand ▾ 
      Collapse ▴ 
    
   
      
      
        
          
  
    
       
      Documentation
      ¶ 
     
    
  
    
  
    
      
        
 
    
User counter is a program that tracks how often a user has visited the index page.
This program demonstrates usage of the Cloud Bigtable API for App Engine flexible environment and Go.
Instructions for running this program are in the README.md.
   
      
     
   
        
      
      
        
  
    
       
      Source Files
      ¶ 
     
   
      
      
     
   
   Click to show internal directories. 
   Click to hide internal directories.