Closed jamiew closed 7 years ago
I would suggest two things. First is to isolate the daemon that Partyshare uses and starts by default. You'll need to set IPFS_PATH
to whatever local directory the user have for data associated to the application. That directory you can get with app.getPath('userData')
(from orbit-electron: https://github.com/orbitdb/orbit-electron/blob/c86504b0f7465ee2ff5cac9be8b78e23018ef9d1/config/orbit.config.js#L24)
Secondly is to set the ports to something that is not the defaults in IPFS (Swarm - 4001, Gateway - 8080 and API 5001) so it won't collide. You can probably turn off the gateway as well, AFAIK, you're not using the gateway.
Also, I would provide the user with a way of configuring Partyshare to not start it's own daemon and reuse the existing one, but it shouldn't happen by default.
Great suggestions @VictorBjelkholm, much appreciated. Breaking up the second task into a separate tickets (#18, #19) and keeping this ticket for the configuration when users already have a ipfs repo to select, and decide whether to start the daemon.
Thanks for starting the issue @jamiew!
Strategy for closing out this ticket is as follows:
IPFS_REPO
Generally just fails to initialize
New to ipfs, but I'd assume it should try to connect to an existing daemon? Or just try a different port?