packagemainimport("github.com/gonuts/flag""github.com/jbenet/commander"h"github.com/jbenet/go-ipfs/http")varcmdIpfsServe=&commander.Command{UsageLine:"serve",Short:"Serve an HTTP API",Long:`ipfs serve - Serve an http gateway into ipfs.`,Run:serveCmd,Flag:*flag.NewFlagSet("ipfs-serve",flag.ExitOnError),}funcserveCmd(c*commander.Command,_[]string)error{n,err:=localNode()iferr!=nil{returnerr}returnh.Serve("127.0.0.1",80,n)}