@cryptotaxi247 / kubo / commits / d04b09c13

local node construction

Juan Batiz-Benet committed Jul 5, 2014 at 13:42 UTC d04b09c136cb5e2b80a7c3f7646c21e6ef449cd1
1 file changed +12
cli/ipfs.go
+12
@@ -4,6 +4,8 @@ import (
4 "fmt"
5 "github.com/gonuts/flag"
6 "github.com/jbenet/commander"
7 + config "github.com/jbenet/go-ipfs/config"
8 + core "github.com/jbenet/go-ipfs/core"
9 u "github.com/jbenet/go-ipfs/util"
10 "os"
11 )
@@ -56,3 +58,13 @@ func main() {
58 }
59 return
60 }
61 +
62 +func localNode() (*core.IpfsNode, error) {
63 + //todo implement config file flag
64 + cfg, err := config.LoadConfig("")
65 + if err != nil {
66 + return nil, err
67 + }
68 +
69 + return core.NewIpfsNode(cfg)
70 +}