lotus/daemon/cmd.go

26 lines
400 B
Go
Raw Normal View History

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