| // Copyright 2017 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| // Devapp generates the dashboard that powers dev.golang.org. |
| // By default devapp listens on port 8081. |
| // Github issues and Gerrit CL's are stored in memory in the running process. |
| // To trigger an initial download, visit http://localhost:8081/update or |
| // http://localhost:8081/update/stats in your browser. |
| _ "golang.org/x/build/devapp" |
| os.Stderr.WriteString(`usage: devapp [-port=port] |
| Devapp generates the dashboard that powers dev.golang.org. |
| port := flag.Uint("port", 8081, "Port to listen on") |
| ln, err := net.Listen("tcp", fmt.Sprintf(":%d", *port)) |
| fmt.Fprintf(os.Stderr, "Listening on port %d\n", *port) |
| log.Fatal(http.Serve(ln, nil)) |