cluster-service: re-use cluster libp2p host for rest API by default

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
This commit is contained in:
Hector Sanjuan 2018-03-15 16:50:07 +01:00
parent 4bed9d0076
commit 3eee5d0ddb

View File

@ -485,7 +485,7 @@ func daemon(c *cli.Context) error {
host, err := ipfscluster.NewClusterHost(ctx, clusterCfg)
checkErr("creating libP2P Host", err)
api, err := rest.NewAPI(apiCfg)
api, err := rest.NewAPIWithHost(apiCfg, host)
checkErr("creating REST API component", err)
proxy, err := ipfshttp.NewConnector(ipfshttpCfg)