README.md: update example commands and remove redundant text

1. Pass the payload to `/compile` using `curl --upload` instead of
`curl --data`.

With the `--data` flag, curl encodes the data in a way that triggers
the call to `(*http.Request).FormValue` (sandbox.go:56) to consume the
request body. When we then attempt to decode the body as JSON
(sandbox.go:58), we then fail the request with `io.EOF`.

If we use the `--upload` flag instead, curl does not set the content
type to the problematic `application/x-www-form-urlencoded` value, and
the call to `FormValue` does not consume the body.

2. Add a name to the `docker run` command line.

(That makes it easier to kill the container when we're done with it.)

3. Remove a redundant copy of the “To submit changes…” sentence.

Change-Id: I314d904f626029306fecbfd25b166927dfa01029
Reviewed-on: https://go-review.googlesource.com/106215
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
1 file changed
tree: 3e0ddd92fef0d5bfd58cbb61f0f52dce09b6ef94
  1. AUTHORS
  2. CONTRIBUTING.md
  3. CONTRIBUTORS
  4. Dockerfile
  5. LICENSE
  6. Makefile
  7. PATENTS
  8. README.md
  9. app.yaml
  10. cache.go
  11. client.go
  12. codereview.cfg
  13. edit.go
  14. edit.html
  15. enable-fake-time.patch
  16. fake_fs.lst
  17. fmt.go
  18. logger.go
  19. main.go
  20. play.go
  21. play_test.go
  22. sandbox.go
  23. server.go
  24. server_test.go
  25. share.go
  26. static/
  27. store.go
README.md

playground

This subrepository holds the source for the Go playground: https://play.golang.org/

Building

# build the image
docker build -t playground .

Running

docker run --name=play --rm -d -p 8080:8080 playground
# run some Go code
cat /path/to/code.go | go run client.go | curl -s --upload-file - localhost:8080/compile

Deployment

gcloud --project=golang-org --account=person@example.com app deploy app.yaml

Contributing

To submit changes to this repository, see https://golang.org/doc/contribute.html.