Commit Graph

13 Commits

Author SHA1 Message Date
Iuri Matias 661f390650 remove console logs; fix events 2019-08-23 11:42:26 -04:00
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
Iuri Matias e432dc328c implement communication stack component, whisper plugin 2019-07-30 15:00:45 -04:00
Iuri Matias 90ea1f0c27 generate embarkjs storage artifact 2019-07-30 11:49:45 -04:00
Iuri Matias 9e0fdac1ef register EmbarkJS.Storage in the console; re-add upload support 2019-07-30 10:38:26 -04:00
Iuri Matias 43d6aa1366 add storage and ipfs components 2019-07-29 17:09:57 -04:00
Iuri Matias dd0cfbc2dc genereate components config files 2019-07-17 17:52:17 -04:00
Iuri Matias 78775afd1c run ipfs code when ipfs starts 2019-07-16 15:57:59 -04:00
Iuri Matias e7526e16da re-add ipfs; register cmd in console; register help cmd 2019-07-16 15:31:25 -04:00
Jonathan Rainville 162d66b675 feat: enable starting and switching storage configs in tests 2019-07-12 12:51:56 -04:00
Michael Bradley, Jr 5930cce7dd chore(release): 4.1.0-beta.5 2019-07-10 16:21:47 -05:00
Jonathan Rainville 9390673ef4 chore: update shelljs to 0.8.3 for all packages 2019-07-08 11:25:30 -05:00
Michael Bradley, Jr 04694edb0b refactor: move storage, ipfs and swarm modules into their own packages 2019-07-05 16:07:45 -05:00