mirror of
https://github.com/golang/go
synced 2024-11-18 10:14:45 -07:00
e9ca907325
Remove all of the code generation and the concept of "APPDIR" - just generate godoc.zip and index files in the app directory. Simplify generation of the zip - use a symlink so that every file in godoc.zip is under the "goroot" directory, regardless of the environment. Previously, the prefix would be dependent on the location of the user's GOROOT. Running the setup script is now optional - it's now possible to run dev_appserver.py on a regular checkout of cmd/godoc without godoc.zip and search index files. Use environment variables to switch whether the zip file is used vs reading GOROOT from the filesystem. Change-Id: I1ce95c891717fe2da975f979778fd775b23f18c8 Reviewed-on: https://go-review.googlesource.com/46725 Reviewed-by: Andrew Bonventre <andybons@golang.org> |
||
---|---|---|
.. | ||
.gitignore | ||
app.dev.yaml | ||
app.prod.yaml | ||
appinit.go | ||
autocert.go | ||
blog.go | ||
codewalk.go | ||
dl.go | ||
doc.go | ||
generate-index.bash | ||
godoc_test.go | ||
goroot.go | ||
handlers.go | ||
index.go | ||
main.go | ||
play.go | ||
README.godoc-app | ||
remotesearch.go | ||
x.go |
godoc on Google App Engine ========================== Prerequisites ------------- * Google Cloud SDK https://cloud.google.com/sdk/ * Go sources under $GOROOT * Godoc sources inside $GOPATH (go get -d golang.org/x/tools/cmd/godoc) Running in dev_appserver.py --------------------------- Use dev_appserver.py to run the server in development mode: dev_appserver.py app.dev.yaml To run the server with generated zip file and search index: ./generate-index.bash dev_appserver.py app.prod.yaml godoc should come up at http://localhost:8080 Use the --host and --port flags to listen on a different address. To clean up the index files, use git: git clean -xn # n is dry run, replace with f Troubleshooting --------------- Ensure the Cloud SDK is on your PATH and you have the app-engine-go component installed (gcloud components install app-engine-go) and your components are up-to-date (gcloud components update)