lotus/daemon/cmd.go
2019-07-02 15:05:43 +02:00

26 lines
400 B
Go

package daemon
import (
"context"
"gopkg.in/urfave/cli.v2"
"github.com/filecoin-project/go-lotus/node"
)
// Cmd is the `go-lotus daemon` command
var Cmd = &cli.Command{
Name: "daemon",
Usage: "Start a lotus daemon process",
Action: func(cctx *cli.Context) error {
ctx := context.Background()
api, err := node.New(ctx)
if err != nil {
return err
}
return serveRPC(api)
},
}