{"action":"created","comment":{"url":"https://api.github.com/repos/runabove/knowledge-base/pulls/comments/24721675","id":24721675,"diff_hunk":"@@ -0,0 +1,144 @@\n+---\n+layout: post\n+title: \"Running your Python Bottle application on Nginx using uWSGI\"\n+categories: development\n+tags: guide, getting-started, python\n+lang: en\n+author: thoorium\n+---\n+\n+[Bottle](http://bottlepy.org/) is a fast, simple and lightweight WSGI micro web-framework for [Python](https://www.python.org/). Coupled with [uWSGI](https://uwsgi-docs.readthedocs.org/en/latest/) and [Nginx](http://nginx.org/) bottle will reach high performances to serve and distribute your content.\n+\n+1. Installing Python, Bottle, uWSGI and Nginx\n+===============================\n+\n+In this guide we will be using _Debian Wheezy_ as our host OS. Getting everything installed is easy thanks to the wondeful package manager.\n+\n+Everything can be installed in a single ``apt-get`` which is available below:\n+\n+```bash\n+sudo apt-get install python2.7 python-bottle uwsgi uwsgi-plugin-python nginx\n+```\n+\n+This will install Python, Bottle, uWSGI, the plugin uWSGI need to run Python applications and Nginx. If you plan to run your application using a Python virtual environnement, do not install ``python-bottle``.\n+\n+2. Hello Runabove\n+===============\n+\n+For this exemple we will create a basic _Hello Runabove_ bottle application that goes like this:\n+\n+```python\n+import bottle\n+\n+from bottle import route, template\n+\n+app = application = bottle.default_app()\n+\n+@route('/')","path":"en/_posts/2015-02-14-how-to-run-bottle-uwsgi-nginx.markdown","position":37,"original_position":37,"commit_id":"7864af1af14e3f004f99a04460c69637923bcaa6","original_commit_id":"7864af1af14e3f004f99a04460c69637923bcaa6","user":{"login":"yadutaf","id":739985,"avatar_url":"https://avatars.githubusercontent.com/u/739985?v=3","gravatar_id":"","url":"https://api.github.com/users/yadutaf","html_url":"https://github.com/yadutaf","followers_url":"https://api.github.com/users/yadutaf/followers","following_url":"https://api.github.com/users/yadutaf/following{/other_user}","gists_url":"https://api.github.com/users/yadutaf/gists{/gist_id}","starred_url":"https://api.github.com/users/yadutaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yadutaf/subscriptions","organizations_url":"https://api.github.com/users/yadutaf/orgs","repos_url":"https://api.github.com/users/yadutaf/repos","events_url":"https://api.github.com/users/yadutaf/events{/privacy}","received_events_url":"https://api.github.com/users/yadutaf/received_events","type":"User","site_admin":false},"body":"This is a matter of personal taste, I agree, but I'd rather use the explicit \"app.route\" over \"route\". This feel less \"magic\".","created_at":"2015-02-15T11:31:32Z","updated_at":"2015-02-15T11:31:32Z","html_url":"https://github.com/runabove/knowledge-base/pull/61#discussion_r24721675","pull_request_url":"https://api.github.com/repos/runabove/knowledge-base/pulls/61","_links":{"self":{"href":"https://api.github.com/repos/runabove/knowledge-base/pulls/comments/24721675"},"html":{"href":"https://github.com/runabove/knowledge-base/pull/61#discussion_r24721675"},"pull_request":{"href":"https://api.github.com/repos/runabove/knowledge-base/pulls/61"}}},"pull_request":{"url":"https://api.github.com/repos/runabove/knowledge-base/pulls/61","id":29328223,"html_url":"https://github.com/runabove/knowledge-base/pull/61","diff_url":"https://github.com/runabove/knowledge-base/pull/61.diff","patch_url":"https://github.com/runabove/knowledge-base/pull/61.patch","issue_url":"https://api.github.com/repos/runabove/knowledge-base/issues/61","number":61,"state":"open","locked":false,"title":"Guide: Running your Python Bottle application on Nginx using uWSGI","user":{"login":"Thoorium","id":7754953,"avatar_url":"https://avatars.githubusercontent.com/u/7754953?v=3","gravatar_id":"","url":"https://api.github.com/users/Thoorium","html_url":"https://github.com/Thoorium","followers_url":"https://api.github.com/users/Thoorium/followers","following_url":"https://api.github.com/users/Thoorium/following{/other_user}","gists_url":"https://api.github.com/users/Thoorium/gists{/gist_id}","starred_url":"https://api.github.com/users/Thoorium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thoorium/subscriptions","organizations_url":"https://api.github.com/users/Thoorium/orgs","repos_url":"https://api.github.com/users/Thoorium/repos","events_url":"https://api.github.com/users/Thoorium/events{/privacy}","received_events_url":"https://api.github.com/users/Thoorium/received_events","type":"User","site_admin":false},"body":"A simple straight to the point guide to help people to run Bottle applications with uWSGI and Nginx.","created_at":"2015-02-15T01:06:36Z","updated_at":"2015-02-15T11:31:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f388a539b716ec1c2bab986542c2f75b900211e3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/runabove/knowledge-base/pulls/61/commits","review_comments_url":"https://api.github.com/repos/runabove/knowledge-base/pulls/61/comments","review_comment_url":"https://api.github.com/repos/runabove/knowledge-base/pulls/comments/{number}","comments_url":"https://api.github.com/repos/runabove/knowledge-base/issues/61/comments","statuses_url":"https://api.github.com/repos/runabove/knowledge-base/statuses/7864af1af14e3f004f99a04460c69637923bcaa6","head":{"label":"Thoorium:master","ref":"master","sha":"7864af1af14e3f004f99a04460c69637923bcaa6","user":{"login":"Thoorium","id":7754953,"avatar_url":"https://avatars.githubusercontent.com/u/7754953?v=3","gravatar_id":"","url":"https://api.github.com/users/Thoorium","html_url":"https://github.com/Thoorium","followers_url":"https://api.github.com/users/Thoorium/followers","following_url":"https://api.github.com/users/Thoorium/following{/other_user}","gists_url":"https://api.github.com/users/Thoorium/gists{/gist_id}","starred_url":"https://api.github.com/users/Thoorium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thoorium/subscriptions","organizations_url":"https://api.github.com/users/Thoorium/orgs","repos_url":"https://api.github.com/users/Thoorium/repos","events_url":"https://api.github.com/users/Thoorium/events{/privacy}","received_events_url":"https://api.github.com/users/Thoorium/received_events","type":"User","site_admin":false},"repo":{"id":30805592,"name":"knowledge-base","full_name":"Thoorium/knowledge-base","owner":{"login":"Thoorium","id":7754953,"avatar_url":"https://avatars.githubusercontent.com/u/7754953?v=3","gravatar_id":"","url":"https://api.github.com/users/Thoorium","html_url":"https://github.com/Thoorium","followers_url":"https://api.github.com/users/Thoorium/followers","following_url":"https://api.github.com/users/Thoorium/following{/other_user}","gists_url":"https://api.github.com/users/Thoorium/gists{/gist_id}","starred_url":"https://api.github.com/users/Thoorium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thoorium/subscriptions","organizations_url":"https://api.github.com/users/Thoorium/orgs","repos_url":"https://api.github.com/users/Thoorium/repos","events_url":"https://api.github.com/users/Thoorium/events{/privacy}","received_events_url":"https://api.github.com/users/Thoorium/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Thoorium/knowledge-base","description":"RunAbove knowledge base website","fork":true,"url":"https://api.github.com/repos/Thoorium/knowledge-base","forks_url":"https://api.github.com/repos/Thoorium/knowledge-base/forks","keys_url":"https://api.github.com/repos/Thoorium/knowledge-base/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Thoorium/knowledge-base/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Thoorium/knowledge-base/teams","hooks_url":"https://api.github.com/repos/Thoorium/knowledge-base/hooks","issue_events_url":"https://api.github.com/repos/Thoorium/knowledge-base/issues/events{/number}","events_url":"https://api.github.com/repos/Thoorium/knowledge-base/events","assignees_url":"https://api.github.com/repos/Thoorium/knowledge-base/assignees{/user}","branches_url":"https://api.github.com/repos/Thoorium/knowledge-base/branches{/branch}","tags_url":"https://api.github.com/repos/Thoorium/knowledge-base/tags","blobs_url":"https://api.github.com/repos/Thoorium/knowledge-base/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Thoorium/knowledge-base/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Thoorium/knowledge-base/git/refs{/sha}","trees_url":"https://api.github.com/repos/Thoorium/knowledge-base/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Thoorium/knowledge-base/statuses/{sha}","languages_url":"https://api.github.com/repos/Thoorium/knowledge-base/languages","stargazers_url":"https://api.github.com/repos/Thoorium/knowledge-base/stargazers","contributors_url":"https://api.github.com/repos/Thoorium/knowledge-base/contributors","subscribers_url":"https://api.github.com/repos/Thoorium/knowledge-base/subscribers","subscription_url":"https://api.github.com/repos/Thoorium/knowledge-base/subscription","commits_url":"https://api.github.com/repos/Thoorium/knowledge-base/commits{/sha}","git_commits_url":"https://api.github.com/repos/Thoorium/knowledge-base/git/commits{/sha}","comments_url":"https://api.github.com/repos/Thoorium/knowledge-base/comments{/number}","issue_comment_url":"https://api.github.com/repos/Thoorium/knowledge-base/issues/comments/{number}","contents_url":"https://api.github.com/repos/Thoorium/knowledge-base/contents/{+path}","compare_url":"https://api.github.com/repos/Thoorium/knowledge-base/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Thoorium/knowledge-base/merges","archive_url":"https://api.github.com/repos/Thoorium/knowledge-base/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Thoorium/knowledge-base/downloads","issues_url":"https://api.github.com/repos/Thoorium/knowledge-base/issues{/number}","pulls_url":"https://api.github.com/repos/Thoorium/knowledge-base/pulls{/number}","milestones_url":"https://api.github.com/repos/Thoorium/knowledge-base/milestones{/number}","notifications_url":"https://api.github.com/repos/Thoorium/knowledge-base/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Thoorium/knowledge-base/labels{/name}","releases_url":"https://api.github.com/repos/Thoorium/knowledge-base/releases{/id}","created_at":"2015-02-14T19:00:43Z","updated_at":"2015-02-15T00:58:25Z","pushed_at":"2015-02-15T00:58:24Z","git_url":"git://github.com/Thoorium/knowledge-base.git","ssh_url":"git@github.com:Thoorium/knowledge-base.git","clone_url":"https://github.com/Thoorium/knowledge-base.git","svn_url":"https://github.com/Thoorium/knowledge-base","homepage":null,"size":11743,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"runabove:master","ref":"master","sha":"e49fec5bdbf3aeee7bc6313c23b12b1c211bcf00","user":{"login":"runabove","id":7061018,"avatar_url":"https://avatars.githubusercontent.com/u/7061018?v=3","gravatar_id":"","url":"https://api.github.com/users/runabove","html_url":"https://github.com/runabove","followers_url":"https://api.github.com/users/runabove/followers","following_url":"https://api.github.com/users/runabove/following{/other_user}","gists_url":"https://api.github.com/users/runabove/gists{/gist_id}","starred_url":"https://api.github.com/users/runabove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runabove/subscriptions","organizations_url":"https://api.github.com/users/runabove/orgs","repos_url":"https://api.github.com/users/runabove/repos","events_url":"https://api.github.com/users/runabove/events{/privacy}","received_events_url":"https://api.github.com/users/runabove/received_events","type":"Organization","site_admin":false},"repo":{"id":23181374,"name":"knowledge-base","full_name":"runabove/knowledge-base","owner":{"login":"runabove","id":7061018,"avatar_url":"https://avatars.githubusercontent.com/u/7061018?v=3","gravatar_id":"","url":"https://api.github.com/users/runabove","html_url":"https://github.com/runabove","followers_url":"https://api.github.com/users/runabove/followers","following_url":"https://api.github.com/users/runabove/following{/other_user}","gists_url":"https://api.github.com/users/runabove/gists{/gist_id}","starred_url":"https://api.github.com/users/runabove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runabove/subscriptions","organizations_url":"https://api.github.com/users/runabove/orgs","repos_url":"https://api.github.com/users/runabove/repos","events_url":"https://api.github.com/users/runabove/events{/privacy}","received_events_url":"https://api.github.com/users/runabove/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/runabove/knowledge-base","description":"RunAbove knowledge base website","fork":false,"url":"https://api.github.com/repos/runabove/knowledge-base","forks_url":"https://api.github.com/repos/runabove/knowledge-base/forks","keys_url":"https://api.github.com/repos/runabove/knowledge-base/keys{/key_id}","collaborators_url":"https://api.github.com/repos/runabove/knowledge-base/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/runabove/knowledge-base/teams","hooks_url":"https://api.github.com/repos/runabove/knowledge-base/hooks","issue_events_url":"https://api.github.com/repos/runabove/knowledge-base/issues/events{/number}","events_url":"https://api.github.com/repos/runabove/knowledge-base/events","assignees_url":"https://api.github.com/repos/runabove/knowledge-base/assignees{/user}","branches_url":"https://api.github.com/repos/runabove/knowledge-base/branches{/branch}","tags_url":"https://api.github.com/repos/runabove/knowledge-base/tags","blobs_url":"https://api.github.com/repos/runabove/knowledge-base/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/runabove/knowledge-base/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/runabove/knowledge-base/git/refs{/sha}","trees_url":"https://api.github.com/repos/runabove/knowledge-base/git/trees{/sha}","statuses_url":"https://api.github.com/repos/runabove/knowledge-base/statuses/{sha}","languages_url":"https://api.github.com/repos/runabove/knowledge-base/languages","stargazers_url":"https://api.github.com/repos/runabove/knowledge-base/stargazers","contributors_url":"https://api.github.com/repos/runabove/knowledge-base/contributors","subscribers_url":"https://api.github.com/repos/runabove/knowledge-base/subscribers","subscription_url":"https://api.github.com/repos/runabove/knowledge-base/subscription","commits_url":"https://api.github.com/repos/runabove/knowledge-base/commits{/sha}","git_commits_url":"https://api.github.com/repos/runabove/knowledge-base/git/commits{/sha}","comments_url":"https://api.github.com/repos/runabove/knowledge-base/comments{/number}","issue_comment_url":"https://api.github.com/repos/runabove/knowledge-base/issues/comments/{number}","contents_url":"https://api.github.com/repos/runabove/knowledge-base/contents/{+path}","compare_url":"https://api.github.com/repos/runabove/knowledge-base/compare/{base}...{head}","merges_url":"https://api.github.com/repos/runabove/knowledge-base/merges","archive_url":"https://api.github.com/repos/runabove/knowledge-base/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/runabove/knowledge-base/downloads","issues_url":"https://api.github.com/repos/runabove/knowledge-base/issues{/number}","pulls_url":"https://api.github.com/repos/runabove/knowledge-base/pulls{/number}","milestones_url":"https://api.github.com/repos/runabove/knowledge-base/milestones{/number}","notifications_url":"https://api.github.com/repos/runabove/knowledge-base/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/runabove/knowledge-base/labels{/name}","releases_url":"https://api.github.com/repos/runabove/knowledge-base/releases{/id}","created_at":"2014-08-21T09:24:33Z","updated_at":"2015-02-15T08:37:25Z","pushed_at":"2015-02-13T11:08:24Z","git_url":"git://github.com/runabove/knowledge-base.git","ssh_url":"git@github.com:runabove/knowledge-base.git","clone_url":"https://github.com/runabove/knowledge-base.git","svn_url":"https://github.com/runabove/knowledge-base","homepage":null,"size":11743,"stargazers_count":26,"watchers_count":26,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":11,"forks":42,"open_issues":11,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/runabove/knowledge-base/pulls/61"},"html":{"href":"https://github.com/runabove/knowledge-base/pull/61"},"issue":{"href":"https://api.github.com/repos/runabove/knowledge-base/issues/61"},"comments":{"href":"https://api.github.com/repos/runabove/knowledge-base/issues/61/comments"},"review_comments":{"href":"https://api.github.com/repos/runabove/knowledge-base/pulls/61/comments"},"review_comment":{"href":"https://api.github.com/repos/runabove/knowledge-base/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/runabove/knowledge-base/pulls/61/commits"},"statuses":{"href":"https://api.github.com/repos/runabove/knowledge-base/statuses/7864af1af14e3f004f99a04460c69637923bcaa6"}}}}