From 62ce3004a0647631383917a16ebb5aac04c7ff79 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sat, 4 Mar 2017 18:36:00 -0500 Subject: [PATCH] update docs --- docs/configuring-storage.rst | 33 +++++++++++++++++++++++++++++++++ docs/index.rst | 1 + docs/using-contracts.rst | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 docs/configuring-storage.rst diff --git a/docs/configuring-storage.rst b/docs/configuring-storage.rst new file mode 100644 index 00000000..dd2ad662 --- /dev/null +++ b/docs/configuring-storage.rst @@ -0,0 +1,33 @@ +Configuring Storage (IPFS) +========================== + +Embark will check your prefered storage configuration in the file ``config/storage.json``. This file will contain the prefered configuration for each environment. With ```default``` being the configuration fields that applies to every environment. Each of those can be individually overriden in a per environment basis. + +e.g : + +.. code:: javascript + + { + "default": { + "enabled": true, + "ipfs_bin": "ipfs", + "provider": "ipfs", + "available_providers": ["ipfs"], + "host": "localhost", + "port": 5001 + }, + "development": { + "enabled": true, + "provider": "ipfs", + "host": "localhost", + "port": 5001 + } + } + +options available: + * ``enabled`` (boolean: true/false) to enable or completly disable storage support + * ``ipfs_bin`` (string) name or desired path to the ipfs binary + * ``provider`` (string: "ipfs") desired provider to automatically connect to on the dapp. e.g in the example above, seting this to ``"ipfs"`` will automaticaly add ``EmbarkJS.setProvider('ipfs', {server: 'localhost', 5001})`` to the generated code + * ``available_providers`` (array: ["ipfs"]) list of storages to be supported on the dapp. This will affect what's available with the EmbarkJS library on the dapp. + * ``host`` and ``port`` of the ipfs node to connect to. + diff --git a/docs/index.rst b/docs/index.rst index 340daf84..bb0baf3c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,6 +17,7 @@ This is a work in progress, feel free to contribute! creating-a-new-dapp.rst libraries-and-languages-available.rst using-contracts.rst + configuring-storage.rst embarkjs.rst embarkjs-storage.rst embarkjs-communication.rst diff --git a/docs/using-contracts.rst b/docs/using-contracts.rst index 7fc7a316..7c68a287 100644 --- a/docs/using-contracts.rst +++ b/docs/using-contracts.rst @@ -1,4 +1,4 @@ -Using Contracts +Configuring & Using Contracts =============== Embark will automatically take care of deployment for you and set all