{"action":"created","comment":{"url":"https://api.github.com/repos/ipfs/examples/pulls/comments/48389893","id":48389893,"diff_hunk":"@@ -0,0 +1,40 @@\n+# WebApps on IPFS\n+\n+This is a short guide on how to start making your own web applications on top of\n+ipfs.  \n+\n+Ipfs provides an http api to interact with the daemon through, but by\n+default it has a few security features enabled that make it difficult for people\n+to use the api in their own apps. There are two different routes you could take\n+to use the API, first, is to run your own webserver, and make http requests to\n+localhost:5001. This is in my opinion the easier route for development. For this\n+to work, you'll need to disable cross origin check by running the daemon with\n+the environment variable `API_ORIGIN` set to `*`:\n+\n+```\n+$ export API_ORIGIN=\"*\"\n+$ ipfs daemon\n+```\n+\n+Now all of the requests you make to the api will work just fine.\n+\n+The second route is to publish your app to ipfs (via `ipfs add -r`) and load\n+it through the http server at `localhost:5001/ipfs/<hash of your app>`. This\n+does not require you to change the `API_ORIGIN` variable (as you'll be loading\n+the app from the correct origin) but you will need to tell the daemon that\n+you want it to allow you to load different apps through the server on the API port.\n+By default you can only load the ipfs webui through the API port, this is a\n+security measure to prevent random web pages from making api calls on your daemon.\n+To disable this for testing your app, run the daemon like:\n+\n+```\n+$ ipfs daemon --unrestricted-api\n+```\n+\n+So now that youre able to load your app, you probably want to start making","path":"webapps/webapps.md","position":34,"original_position":34,"commit_id":"6f3baa67902dfe3fffd20609845a4aadc14c3e88","original_commit_id":"6f3baa67902dfe3fffd20609845a4aadc14c3e88","user":{"login":"RichardLitt","id":910753,"avatar_url":"https://avatars.githubusercontent.com/u/910753?v=3","gravatar_id":"","url":"https://api.github.com/users/RichardLitt","html_url":"https://github.com/RichardLitt","followers_url":"https://api.github.com/users/RichardLitt/followers","following_url":"https://api.github.com/users/RichardLitt/following{/other_user}","gists_url":"https://api.github.com/users/RichardLitt/gists{/gist_id}","starred_url":"https://api.github.com/users/RichardLitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichardLitt/subscriptions","organizations_url":"https://api.github.com/users/RichardLitt/orgs","repos_url":"https://api.github.com/users/RichardLitt/repos","events_url":"https://api.github.com/users/RichardLitt/events{/privacy}","received_events_url":"https://api.github.com/users/RichardLitt/received_events","type":"User","site_admin":false},"body":"youre >> you're","created_at":"2015-12-24T00:54:49Z","updated_at":"2015-12-24T00:54:49Z","html_url":"https://github.com/ipfs/examples/pull/25#discussion_r48389893","pull_request_url":"https://api.github.com/repos/ipfs/examples/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/ipfs/examples/pulls/comments/48389893"},"html":{"href":"https://github.com/ipfs/examples/pull/25#discussion_r48389893"},"pull_request":{"href":"https://api.github.com/repos/ipfs/examples/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/ipfs/examples/pulls/25","id":41720362,"html_url":"https://github.com/ipfs/examples/pull/25","diff_url":"https://github.com/ipfs/examples/pull/25.diff","patch_url":"https://github.com/ipfs/examples/pull/25.patch","issue_url":"https://api.github.com/repos/ipfs/examples/issues/25","number":25,"state":"open","locked":false,"title":"start a quick intro guide to making ipfs webapps","user":{"login":"whyrusleeping","id":1243164,"avatar_url":"https://avatars.githubusercontent.com/u/1243164?v=3","gravatar_id":"","url":"https://api.github.com/users/whyrusleeping","html_url":"https://github.com/whyrusleeping","followers_url":"https://api.github.com/users/whyrusleeping/followers","following_url":"https://api.github.com/users/whyrusleeping/following{/other_user}","gists_url":"https://api.github.com/users/whyrusleeping/gists{/gist_id}","starred_url":"https://api.github.com/users/whyrusleeping/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whyrusleeping/subscriptions","organizations_url":"https://api.github.com/users/whyrusleeping/orgs","repos_url":"https://api.github.com/users/whyrusleeping/repos","events_url":"https://api.github.com/users/whyrusleeping/events{/privacy}","received_events_url":"https://api.github.com/users/whyrusleeping/received_events","type":"User","site_admin":false},"body":"This definitely needs some feedback, but i  think that we need a guide like this to encourage people to build more awesome things on ipfs.","created_at":"2015-08-05T20:08:29Z","updated_at":"2015-12-24T00:54:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7351aa16167980af6c025d48b1b21c0174929328","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ipfs/examples/pulls/25/commits","review_comments_url":"https://api.github.com/repos/ipfs/examples/pulls/25/comments","review_comment_url":"https://api.github.com/repos/ipfs/examples/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ipfs/examples/issues/25/comments","statuses_url":"https://api.github.com/repos/ipfs/examples/statuses/6f3baa67902dfe3fffd20609845a4aadc14c3e88","head":{"label":"ipfs:webapp-guide","ref":"webapp-guide","sha":"6f3baa67902dfe3fffd20609845a4aadc14c3e88","user":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"repo":{"id":30059552,"name":"examples","full_name":"ipfs/examples","owner":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ipfs/examples","description":"examples for ipfs","fork":false,"url":"https://api.github.com/repos/ipfs/examples","forks_url":"https://api.github.com/repos/ipfs/examples/forks","keys_url":"https://api.github.com/repos/ipfs/examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ipfs/examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ipfs/examples/teams","hooks_url":"https://api.github.com/repos/ipfs/examples/hooks","issue_events_url":"https://api.github.com/repos/ipfs/examples/issues/events{/number}","events_url":"https://api.github.com/repos/ipfs/examples/events","assignees_url":"https://api.github.com/repos/ipfs/examples/assignees{/user}","branches_url":"https://api.github.com/repos/ipfs/examples/branches{/branch}","tags_url":"https://api.github.com/repos/ipfs/examples/tags","blobs_url":"https://api.github.com/repos/ipfs/examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ipfs/examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ipfs/examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/ipfs/examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ipfs/examples/statuses/{sha}","languages_url":"https://api.github.com/repos/ipfs/examples/languages","stargazers_url":"https://api.github.com/repos/ipfs/examples/stargazers","contributors_url":"https://api.github.com/repos/ipfs/examples/contributors","subscribers_url":"https://api.github.com/repos/ipfs/examples/subscribers","subscription_url":"https://api.github.com/repos/ipfs/examples/subscription","commits_url":"https://api.github.com/repos/ipfs/examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/ipfs/examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/ipfs/examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/ipfs/examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/ipfs/examples/contents/{+path}","compare_url":"https://api.github.com/repos/ipfs/examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ipfs/examples/merges","archive_url":"https://api.github.com/repos/ipfs/examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ipfs/examples/downloads","issues_url":"https://api.github.com/repos/ipfs/examples/issues{/number}","pulls_url":"https://api.github.com/repos/ipfs/examples/pulls{/number}","milestones_url":"https://api.github.com/repos/ipfs/examples/milestones{/number}","notifications_url":"https://api.github.com/repos/ipfs/examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ipfs/examples/labels{/name}","releases_url":"https://api.github.com/repos/ipfs/examples/releases{/id}","created_at":"2015-01-30T06:31:42Z","updated_at":"2015-12-10T22:46:56Z","pushed_at":"2015-12-13T21:07:18Z","git_url":"git://github.com/ipfs/examples.git","ssh_url":"git@github.com:ipfs/examples.git","clone_url":"https://github.com/ipfs/examples.git","svn_url":"https://github.com/ipfs/examples","homepage":"","size":27103,"stargazers_count":44,"watchers_count":44,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":14,"forks":27,"open_issues":14,"watchers":44,"default_branch":"master"}},"base":{"label":"ipfs:master","ref":"master","sha":"495efa728e55fa1fc179fa5d50a2c10636787d64","user":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"repo":{"id":30059552,"name":"examples","full_name":"ipfs/examples","owner":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ipfs/examples","description":"examples for ipfs","fork":false,"url":"https://api.github.com/repos/ipfs/examples","forks_url":"https://api.github.com/repos/ipfs/examples/forks","keys_url":"https://api.github.com/repos/ipfs/examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ipfs/examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ipfs/examples/teams","hooks_url":"https://api.github.com/repos/ipfs/examples/hooks","issue_events_url":"https://api.github.com/repos/ipfs/examples/issues/events{/number}","events_url":"https://api.github.com/repos/ipfs/examples/events","assignees_url":"https://api.github.com/repos/ipfs/examples/assignees{/user}","branches_url":"https://api.github.com/repos/ipfs/examples/branches{/branch}","tags_url":"https://api.github.com/repos/ipfs/examples/tags","blobs_url":"https://api.github.com/repos/ipfs/examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ipfs/examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ipfs/examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/ipfs/examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ipfs/examples/statuses/{sha}","languages_url":"https://api.github.com/repos/ipfs/examples/languages","stargazers_url":"https://api.github.com/repos/ipfs/examples/stargazers","contributors_url":"https://api.github.com/repos/ipfs/examples/contributors","subscribers_url":"https://api.github.com/repos/ipfs/examples/subscribers","subscription_url":"https://api.github.com/repos/ipfs/examples/subscription","commits_url":"https://api.github.com/repos/ipfs/examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/ipfs/examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/ipfs/examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/ipfs/examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/ipfs/examples/contents/{+path}","compare_url":"https://api.github.com/repos/ipfs/examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ipfs/examples/merges","archive_url":"https://api.github.com/repos/ipfs/examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ipfs/examples/downloads","issues_url":"https://api.github.com/repos/ipfs/examples/issues{/number}","pulls_url":"https://api.github.com/repos/ipfs/examples/pulls{/number}","milestones_url":"https://api.github.com/repos/ipfs/examples/milestones{/number}","notifications_url":"https://api.github.com/repos/ipfs/examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ipfs/examples/labels{/name}","releases_url":"https://api.github.com/repos/ipfs/examples/releases{/id}","created_at":"2015-01-30T06:31:42Z","updated_at":"2015-12-10T22:46:56Z","pushed_at":"2015-12-13T21:07:18Z","git_url":"git://github.com/ipfs/examples.git","ssh_url":"git@github.com:ipfs/examples.git","clone_url":"https://github.com/ipfs/examples.git","svn_url":"https://github.com/ipfs/examples","homepage":"","size":27103,"stargazers_count":44,"watchers_count":44,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":14,"forks":27,"open_issues":14,"watchers":44,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ipfs/examples/pulls/25"},"html":{"href":"https://github.com/ipfs/examples/pull/25"},"issue":{"href":"https://api.github.com/repos/ipfs/examples/issues/25"},"comments":{"href":"https://api.github.com/repos/ipfs/examples/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/ipfs/examples/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/ipfs/examples/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ipfs/examples/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/ipfs/examples/statuses/6f3baa67902dfe3fffd20609845a4aadc14c3e88"}}}}