implemented suggestions by whyrusleeping
verokarhu committed
Aug 7, 2014 at 08:32 UTC
0a25b64f0a139df629a6bfabe7adc39fd6d054a2
1 file changed
+2
-3
cmd/ipfs/serve.go
+2
-3
@@ -6,7 +6,6 @@ import (
6
"github.com/gonuts/flag"
7
"github.com/jbenet/commander"
8
h "github.com/jbenet/go-ipfs/http"
9
- "strconv"
9
)
10
11
var cmdIpfsServe = &commander.Command{
@@ -18,7 +17,7 @@ var cmdIpfsServe = &commander.Command{
17
}
18
19
func init() {
21
- cmdIpfsServe.Flag.Uint("port", 80, "Port number")
20
+ cmdIpfsServe.Flag.Uint("port", 8080, "Port number")
21
cmdIpfsServe.Flag.String("hostname", "localhost", "Hostname")
22
}
23
@@ -35,7 +34,7 @@ func serveCmd(c *commander.Command, _ []string) error {
34
return err
35
}
36
38
- address := hostname + ":" + strconv.FormatUint(uint64(port), 10)
37
+ address := fmt.Sprintf("%s:%d", hostname, port)
38
fmt.Printf("Serving on %s\n", address)
39
40
return h.Serve(address, n)