embark/packages/embark-storage
Eric Mastro 06c0c72b7c refactor(@embark/embark-swarm): Re-add swarm storage plugin (#1783)
* add web3 connection

* add TODO

* refactor(@embark/embark-swarm): Re-add swarm storage plugin

Swarm added back in to the refactored code.

Prevent Embark from hanging when Swarm/IPFS crashes.

Use swarm config as per below

To take this PR for a spin, update `dapps/templates/demo/config/storage.js` with the following:
```
module.exports = {
  // default applies to all environments
  default: {
    enabled: true,
    ipfs_bin: "ipfs",
    available_providers: ["ipfs", "swarm"],
    upload: {
      provider: "swarm",
      host: "localhost",
      port: 8500
    },
    dappConnection: [
      {
        provider: "swarm",
        host: "localhost",
        port: 8500,
        getUrl: "http://localhost:8500/bzz:/"
      }
    ]
    // Configuration to start Swarm in the same terminal as `embark run`
    , account: {
      address: "SWAM_ACCOUNT_ADDRESS", // Address of account accessing Swarm
      password: "config/development/password" // File containing the password of the account
    },
    /*swarmPath: "PATH/TO/SWARM/EXECUTABLE" // Path to swarm executable (default: swarm)*/
  }
};

```

NOTE: `account.address` needs to be a node account. Please make sure `embark run2` has been run first, then create a new node account and update the config, then re-run embark.

1. `embark run2`
2. `geth account new --datadir=.embark/development/datadir --password=config/development/password`
3. Copy output from #2 to `account.address` in config
4. Re-run `embark run2`
2019-08-22 12:57:39 -04:00
..
src refactor(@embark/embark-swarm): Re-add swarm storage plugin (#1783) 2019-08-22 12:57:39 -04:00
.npmrc refactor: move storage, ipfs and swarm modules into their own packages 2019-07-05 16:07:45 -05:00
CHANGELOG.md chore(release): 4.1.0-beta.5 2019-07-10 16:21:47 -05:00
README.md refactor: move storage, ipfs and swarm modules into their own packages 2019-07-05 16:07:45 -05:00
package.json chore(release): 4.1.0-beta.5 2019-07-10 16:21:47 -05:00
processes.js refactor: move storage, ipfs and swarm modules into their own packages 2019-07-05 16:07:45 -05:00
tsconfig.json refactor: move storage, ipfs and swarm modules into their own packages 2019-07-05 16:07:45 -05:00
tslint.json refactor: move storage, ipfs and swarm modules into their own packages 2019-07-05 16:07:45 -05:00

README.md

embark-storage

Storage provider abstraction module for Embark

Visit embark.status.im to get started with Embark.