github.com/xushiwei/go@v0.0.0-20130601165731-2b9d83f45bc9/src/cmd/godoc/README.godoc-app (about)

     1  Copyright 2011 The Go Authors. All rights reserved.
     2  Use of this source code is governed by a BSD-style
     3  license that can be found in the LICENSE file.
     4  
     5  godoc on appengine
     6  ------------------
     7  
     8  Prerequisites
     9  -------------
    10  
    11  * Go appengine SDK
    12    https://developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Go
    13  
    14  * Go sources at tip under $GOROOT
    15  
    16  
    17  Directory structure
    18  -------------------
    19  
    20  * Let $APPDIR be the directory containing the app engine files.
    21    (e.g., $APPDIR=$HOME/godoc-app)
    22  
    23  * $APPDIR contains the following entries (this may change depending on
    24    app-engine release and version of godoc):
    25  
    26  	app.yaml
    27  	godoc.zip
    28  	godoc/
    29  	index.split.*
    30  
    31  * The app.yaml file is set up per app engine documentation.
    32    For instance:
    33  
    34  	application: godoc-app
    35  	version: 1
    36  	runtime: go
    37  	api_version: go1
    38  
    39  	handlers:
    40  	- url: /.*
    41  	  script: _go_app
    42  
    43  * The godoc/ directory contains a copy of the files under $GOROOT/src/cmd/godoc
    44    with doc.go excluded (it belongs to pseudo-package "documentation")
    45  
    46  
    47  Configuring and running godoc
    48  -----------------------------
    49  
    50  To configure godoc, run
    51  
    52  	bash setup-godoc-app.bash
    53  
    54  to create the godoc.zip, index.split.*, and godoc/appconfig.go files
    55  based on $GOROOT and $APPDIR. See the script for details on usage.
    56  
    57  To run godoc locally, using the app-engine emulator, run
    58  
    59  	<path to google_appengine>/dev_appserver.py $APPDIR
    60  
    61  godoc should come up at http://localhost:8080 .