Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webapp work on top of IPFS api directly #42

Open
jbenet opened this issue Oct 31, 2015 · 4 comments
Open

Webapp work on top of IPFS api directly #42

jbenet opened this issue Oct 31, 2015 · 4 comments
Labels

Comments

@jbenet
Copy link

jbenet commented Oct 31, 2015

Offline: You can also run the application locally by cloning the project and start webserver of choice, serving the root folder. python -m SimpleHTTPServer is a handy command for serving from current folder.

Why need server? why not just access it on the IPFS daemon's api directly? (with proper CORS setup)

(once ipfs/kubo#1886 is merged, we wont even need that)

@victorb
Copy link
Owner

victorb commented Oct 31, 2015

Good question! Looked into why and this is why.

Some API methods in js-ipfs-api gets different responses depending on where they run, ipfs.add seems to be one of them. When running via my local gateway, http://localhost:5001/ipfs/QmURTVk4xWXXNHE5xBTDojSmLJr9BvJXeHqVNr63XJ2fzC, it returns a array of objects that has the hash. But, when running from ipfsbin.xyz, it instead returns an object directly. Probably/Maybe has to do with ipfs-inactive/js-ipfs-http-client#79 or ipfs-inactive/js-ipfs-http-client#76

@victorb victorb added the bug label Oct 31, 2015
@jbenet
Copy link
Author

jbenet commented Oct 31, 2015

ipfs/kubo#1886 is merged as part of 0.3.9 release.

@victorb
Copy link
Owner

victorb commented Oct 31, 2015

Now just waiting for ipfs/infra#105 then I'll enable writing to the public gateway by default, falling back to ipfsbin.xyz if not working.

@jbenet
Copy link
Author

jbenet commented Nov 1, 2015

Sounds good. Though 0.3.9 means you no longer need the private API, can do everything through the public Gateway/API now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants