From 49c2b0817c74e9af19abe17101b38ababb79134d Mon Sep 17 00:00:00 2001 From: David Dias Date: Wed, 20 Dec 2017 17:14:26 +0000 Subject: [PATCH 1/3] docs: add FAQ about Electron ref: https://github.com/ipfs/js-ipfs/issues/843#issuecomment-332088905 --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 8765020b71..bc0c9d6048 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ You can check the development status at the [Waffle Board](https://waffle.io/ipf - [Network](#network) - [Node Management](#node-management) - [Domain data types](#domain-data-types) +- [FAQ](#faq) - [Packages](#packages) - [Development](#development) - [Clone and install dependencies](#clone-and-install-dependencies) @@ -441,6 +442,27 @@ Yes, unfortunately, due to [Chrome aggressive resource throttling policy](https: A way to mitigate this in Chrome, is to run your IPFS node inside a Service Worker, so that the IPFS instance runs in a background process. You can learn how to install an IPFS node as a service worker in here the repo [ipfs-service-worker](https://github.com/ipfs/ipfs-service-worker) +#### Can I use IPFS in my Electron App? + +Yes you can and in many ways. Read https://github.com/ipfs/notes/issues/256 for the multiple options. + +If your electron-rebuild step is failing, all you need to do is: + +```bash +# Electron's version. +export npm_config_target=1.7.6 +# The architecture of Electron, can be ia32 or x64. +export npm_config_arch=x64 +export npm_config_target_arch=x64 +# Download headers for Electron. +export npm_config_disturl=https://atom.io/download/electron +# Tell node-pre-gyp that we are building for Electron. +export npm_config_runtime=electron +# Tell node-pre-gyp to build module from source code. +export npm_config_build_from_source=true +# Install all dependencies, and store cache to ~/.electron-gyp. +HOME=~/.electron-gyp npm install +``` ## Packages From 2bf83340385a3fe9d2414312a924a1ddd4248a0b Mon Sep 17 00:00:00 2001 From: David Dias Date: Thu, 28 Dec 2017 08:14:07 +0000 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bc0c9d6048..8693b1ecbb 100644 --- a/README.md +++ b/README.md @@ -446,7 +446,7 @@ A way to mitigate this in Chrome, is to run your IPFS node inside a Service Work Yes you can and in many ways. Read https://github.com/ipfs/notes/issues/256 for the multiple options. -If your electron-rebuild step is failing, all you need to do is: +If your [electron-rebuild step is failing](https://github.com/ipfs/js-ipfs/issues/843), all you need to do is: ```bash # Electron's version. From 43ef0fb31e690ff10b1776a0d5b1104ca95ab03d Mon Sep 17 00:00:00 2001 From: David Dias Date: Thu, 28 Dec 2017 08:15:08 +0000 Subject: [PATCH 3/3] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8693b1ecbb..ccfb9a98e6 100644 --- a/README.md +++ b/README.md @@ -464,6 +464,8 @@ export npm_config_build_from_source=true HOME=~/.electron-gyp npm install ``` +If you find any other issue, please check the [`Electron Support` issue](https://github.com/ipfs/js-ipfs/issues/843). + ## Packages | Package | Version | Deps | DevDeps | Travis | Circle | AppVeyor | Coverage |