lotus/daemon/rpc.go
Łukasz Magiera 795621ed27 Node builder structure
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-07-01 23:11:33 +02:00

17 lines
334 B
Go

package daemon
import (
"net/http"
"github.com/filecoin-project/go-lotus/api"
"github.com/filecoin-project/go-lotus/rpclib"
)
func serveRPC(api api.API) error {
rpcServer := rpclib.NewServer()
rpcServer.Register("Filecoin", api)
http.Handle("/rpc/v0", rpcServer)
return http.ListenAndServe(":1234", http.DefaultServeMux)
}