diff --git a/webapp/app.jsx b/webapp/app.jsx
index 680f149..bcee0b8 100644
--- a/webapp/app.jsx
+++ b/webapp/app.jsx
@@ -6,9 +6,15 @@ var IndexRoute = require('react-router').IndexRoute
var Link = require('react-router').Link
var MarkdownLib = require('react-markdown')
-var ipfs = require('ipfs-api')('localhost',5001)
var BoardsAPI = require('../lib/boards-api.js')
+var opt, s = localStorage.getItem('ipfs-boards-settings')
+try {
+ opt = JSON.parse(s)
+} catch(e){
+ opt = { addr: 'localhost', port: 5001 }
+}
+var ipfs = require('ipfs-api')(opt.addr || 'localhost',opt.port || 5001)
var boards = new BoardsAPI(ipfs)
// Components
@@ -130,15 +136,19 @@ var Homepage = React.createClass({
var GetIPFS = React.createClass({
render: function(){
return (
-
-
Missing IPFS Node
-
You don't have an IPFS node running at localhost:5001
- or it is not reachable
+
+
Missing IPFS Node
+
You don't have an IPFS node running at {opt.addr}:{opt.port} or it is not reachable
The IPFS Boards prototype requires a full IPFS node running at localhost.
Please start one by following the
go-ipfs documentation.
-
If you have a running node but still this doesn't work, it's probably a CORS issue
-
You can find out how to fix CORS issues related to this app here.
+
Do you have a running node but the app won't work?
+
It's probably one of these issues:
+
+
Your IPFS node doesn't allow requests from the domain you're running the app from (CORS issue). See here for the fix.
+
Your IPFS node is not listening for API requests at {opt.addr}:{opt.port}. Go to the Settings page, provide the correct address for the node, then save and reload the page.
+
Some other networking issue is preventing the App from talking to your node.