Skip to content
master
Switch branches/tags
go-ipfs-play/ipfs-daemon-start/
go-ipfs-play/ipfs-daemon-start/

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Start IPFS Daemon via exec.Cmd

Inspired by a forum post I've played around to start an IPFS daemon via ipfs daemon.

  • created an extra IPFS directory
export IPFS_PATH=~/.ipfs_daemon
ipfs init
  • written main.go

  • run it using the extra IPFS directory

export IPFS_PATH=~/.ipfs_daemon
go run main.go
  • opened the WebUI 👍

  • ask the API something 👍

curl -s "http://localhost:5001/api/v0/id" | jq
  • run it again
go run main.go