{"action":"created","comment":{"url":"https://api.github.com/repos/auth0-blog/guest-writer/pulls/comments/216309939","pull_request_review_id":153754138,"id":216309939,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjMwOTkzOQ==","diff_hunk":"@@ -0,0 +1,281 @@\n+---\n+layout: post\n+title: \"Using Python, Flask, and Angular to Build Modern Web Apps - Part 4\"\n+description: \"Moving your code to the cloud\"\n+date: \"2018-09-04 08:30\"\n+author:\n+  name: \"Douglas Slingerland\"\n+  url: \"https://twitter.com/dudango\"\n+  website: \"http://www.dudango.com\"\n+  mail: \"douglas@dudango.com\"\n+  avatar: \"https://twitter.com/https://twitter.com/dudango/profile_image?size=original\"\n+related:\n+- 2017-11-15-an-example-of-all-possible-elements\n+---\n+\n+**TL;DR:** Briefly describe what this article is about and what the reader will achieve/learn after reading it. Please,\n+also provide the link to a GitHub repository that contains code related to this article.\n+\n+## The Second Most Important Title\n+\n+UIn this part of the series you will deploy your web application to the web using a free service called Heroku.  Heroku will host your application in the cloud with minimal configuration allowing it be accessed by anyone you share the link with.   \n+\n+After that, you will set up a separate staging and production environments to allow continued development without interrupting the production service. \n+\n+You will separate the backend from the frontend and setup a pipeline to promote your development code from staging to production.  \n+\n+# Preperations:\n+\n+- Sign up for a [free Heroku Account](https://signup.heroku.com/dc)\n+- Once you've created an account, [install the Heroku CLI client for your platform](https://devcenter.heroku.com/articles/getting-started-with-python#set-up)\n+```sh\n+# After installing, login using the CLI with \n+heroku login\n+\n+# prepare heroku for your code Navigate to your root folder where your git is initiated and run the following command \n+\n+heroku create\n+\n+# rename heroku remote to match backend\n+git remote rename heroku backend \n+```\n+\n+# Pushing your Postgres database to the cloud \n+The first step you will take is to move your database to the cloud \n+You are going to create an app to hold your database. \n+\n+To migrate your previous database using Heroku CLI you will need to [install the CLI tools for postgres](https://postgresapp.com/documentation/cli-tools.html) \n+\n+\n+```sh\n+# Setup new Postgres database on Heroku\n+heroku addons:create heroku-postgresql:hobby-dev\n+\n+# Verify successful deployment , the field under : add-on is your database name\n+heroku pg\n+\n+# Get your connection string with the following command, enter the name of your database you created earlier\n+heroku pg:credentials:url DATABASENAME\n+\n+# migrate database from local to the prepared heroku postgresql database\n+heroku pg:push SOURCE TARGET\n+heroku pg:push postgresql://postgres:password@localhost:5432/postgres DATABASENAME\n+```\n+\n+\n+# Updating the backend\n+You will need to make a few changes to the backend to reference the new database before deploying the code to the new heroku cloud platform. ","path":"articles/2018-09-04-title.markdown","position":67,"original_position":67,"commit_id":"fd2ffa1d3fd3ac17a25715e32c15da85b2a4ddf1","original_commit_id":"fd2ffa1d3fd3ac17a25715e32c15da85b2a4ddf1","user":{"login":"brunokrebs","id":15347252,"node_id":"MDQ6VXNlcjE1MzQ3MjUy","avatar_url":"https://avatars1.githubusercontent.com/u/15347252?v=4","gravatar_id":"","url":"https://api.github.com/users/brunokrebs","html_url":"https://github.com/brunokrebs","followers_url":"https://api.github.com/users/brunokrebs/followers","following_url":"https://api.github.com/users/brunokrebs/following{/other_user}","gists_url":"https://api.github.com/users/brunokrebs/gists{/gist_id}","starred_url":"https://api.github.com/users/brunokrebs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunokrebs/subscriptions","organizations_url":"https://api.github.com/users/brunokrebs/orgs","repos_url":"https://api.github.com/users/brunokrebs/repos","events_url":"https://api.github.com/users/brunokrebs/events{/privacy}","received_events_url":"https://api.github.com/users/brunokrebs/received_events","type":"User","site_admin":false},"body":"You don't even mention the name of the file that the reader is supposed to change.","created_at":"2018-09-10T12:56:21Z","updated_at":"2018-09-10T12:58:58Z","html_url":"https://github.com/auth0-blog/guest-writer/pull/28#discussion_r216309939","pull_request_url":"https://api.github.com/repos/auth0-blog/guest-writer/pulls/28","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/auth0-blog/guest-writer/pulls/comments/216309939"},"html":{"href":"https://github.com/auth0-blog/guest-writer/pull/28#discussion_r216309939"},"pull_request":{"href":"https://api.github.com/repos/auth0-blog/guest-writer/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/auth0-blog/guest-writer/pulls/28","id":213032842,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzMDMyODQy","html_url":"https://github.com/auth0-blog/guest-writer/pull/28","diff_url":"https://github.com/auth0-blog/guest-writer/pull/28.diff","patch_url":"https://github.com/auth0-blog/guest-writer/pull/28.patch","issue_url":"https://api.github.com/repos/auth0-blog/guest-writer/issues/28","number":28,"state":"open","locked":false,"title":"updated markdown for article","user":{"login":"dudango","id":2019157,"node_id":"MDQ6VXNlcjIwMTkxNTc=","avatar_url":"https://avatars1.githubusercontent.com/u/2019157?v=4","gravatar_id":"","url":"https://api.github.com/users/dudango","html_url":"https://github.com/dudango","followers_url":"https://api.github.com/users/dudango/followers","following_url":"https://api.github.com/users/dudango/following{/other_user}","gists_url":"https://api.github.com/users/dudango/gists{/gist_id}","starred_url":"https://api.github.com/users/dudango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dudango/subscriptions","organizations_url":"https://api.github.com/users/dudango/orgs","repos_url":"https://api.github.com/users/dudango/repos","events_url":"https://api.github.com/users/dudango/events{/privacy}","received_events_url":"https://api.github.com/users/dudango/received_events","type":"User","site_admin":false},"body":"Creating a pull request to submit the first draft of the Python Flask Angular part 4 tutorial to receive comments and further direction from Bruno Krebs","created_at":"2018-09-04T16:20:01Z","updated_at":"2018-09-10T12:58:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0bbc3acf646c4997c8454b421550e93e51ec3563","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/auth0-blog/guest-writer/pulls/28/commits","review_comments_url":"https://api.github.com/repos/auth0-blog/guest-writer/pulls/28/comments","review_comment_url":"https://api.github.com/repos/auth0-blog/guest-writer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/auth0-blog/guest-writer/issues/28/comments","statuses_url":"https://api.github.com/repos/auth0-blog/guest-writer/statuses/fd2ffa1d3fd3ac17a25715e32c15da85b2a4ddf1","head":{"label":"dudango:PythonFlaskAngular","ref":"PythonFlaskAngular","sha":"fd2ffa1d3fd3ac17a25715e32c15da85b2a4ddf1","user":{"login":"dudango","id":2019157,"node_id":"MDQ6VXNlcjIwMTkxNTc=","avatar_url":"https://avatars1.githubusercontent.com/u/2019157?v=4","gravatar_id":"","url":"https://api.github.com/users/dudango","html_url":"https://github.com/dudango","followers_url":"https://api.github.com/users/dudango/followers","following_url":"https://api.github.com/users/dudango/following{/other_user}","gists_url":"https://api.github.com/users/dudango/gists{/gist_id}","starred_url":"https://api.github.com/users/dudango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dudango/subscriptions","organizations_url":"https://api.github.com/users/dudango/orgs","repos_url":"https://api.github.com/users/dudango/repos","events_url":"https://api.github.com/users/dudango/events{/privacy}","received_events_url":"https://api.github.com/users/dudango/received_events","type":"User","site_admin":false},"repo":{"id":147373428,"node_id":"MDEwOlJlcG9zaXRvcnkxNDczNzM0Mjg=","name":"guest-writer","full_name":"dudango/guest-writer","owner":{"login":"dudango","id":2019157,"node_id":"MDQ6VXNlcjIwMTkxNTc=","avatar_url":"https://avatars1.githubusercontent.com/u/2019157?v=4","gravatar_id":"","url":"https://api.github.com/users/dudango","html_url":"https://github.com/dudango","followers_url":"https://api.github.com/users/dudango/followers","following_url":"https://api.github.com/users/dudango/following{/other_user}","gists_url":"https://api.github.com/users/dudango/gists{/gist_id}","starred_url":"https://api.github.com/users/dudango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dudango/subscriptions","organizations_url":"https://api.github.com/users/dudango/orgs","repos_url":"https://api.github.com/users/dudango/repos","events_url":"https://api.github.com/users/dudango/events{/privacy}","received_events_url":"https://api.github.com/users/dudango/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dudango/guest-writer","description":"A repository to smooth the process for guest writers.","fork":true,"url":"https://api.github.com/repos/dudango/guest-writer","forks_url":"https://api.github.com/repos/dudango/guest-writer/forks","keys_url":"https://api.github.com/repos/dudango/guest-writer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dudango/guest-writer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dudango/guest-writer/teams","hooks_url":"https://api.github.com/repos/dudango/guest-writer/hooks","issue_events_url":"https://api.github.com/repos/dudango/guest-writer/issues/events{/number}","events_url":"https://api.github.com/repos/dudango/guest-writer/events","assignees_url":"https://api.github.com/repos/dudango/guest-writer/assignees{/user}","branches_url":"https://api.github.com/repos/dudango/guest-writer/branches{/branch}","tags_url":"https://api.github.com/repos/dudango/guest-writer/tags","blobs_url":"https://api.github.com/repos/dudango/guest-writer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dudango/guest-writer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dudango/guest-writer/git/refs{/sha}","trees_url":"https://api.github.com/repos/dudango/guest-writer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dudango/guest-writer/statuses/{sha}","languages_url":"https://api.github.com/repos/dudango/guest-writer/languages","stargazers_url":"https://api.github.com/repos/dudango/guest-writer/stargazers","contributors_url":"https://api.github.com/repos/dudango/guest-writer/contributors","subscribers_url":"https://api.github.com/repos/dudango/guest-writer/subscribers","subscription_url":"https://api.github.com/repos/dudango/guest-writer/subscription","commits_url":"https://api.github.com/repos/dudango/guest-writer/commits{/sha}","git_commits_url":"https://api.github.com/repos/dudango/guest-writer/git/commits{/sha}","comments_url":"https://api.github.com/repos/dudango/guest-writer/comments{/number}","issue_comment_url":"https://api.github.com/repos/dudango/guest-writer/issues/comments{/number}","contents_url":"https://api.github.com/repos/dudango/guest-writer/contents/{+path}","compare_url":"https://api.github.com/repos/dudango/guest-writer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dudango/guest-writer/merges","archive_url":"https://api.github.com/repos/dudango/guest-writer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dudango/guest-writer/downloads","issues_url":"https://api.github.com/repos/dudango/guest-writer/issues{/number}","pulls_url":"https://api.github.com/repos/dudango/guest-writer/pulls{/number}","milestones_url":"https://api.github.com/repos/dudango/guest-writer/milestones{/number}","notifications_url":"https://api.github.com/repos/dudango/guest-writer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dudango/guest-writer/labels{/name}","releases_url":"https://api.github.com/repos/dudango/guest-writer/releases{/id}","deployments_url":"https://api.github.com/repos/dudango/guest-writer/deployments","created_at":"2018-09-04T16:10:50Z","updated_at":"2018-09-04T16:10:52Z","pushed_at":"2018-09-04T16:18:50Z","git_url":"git://github.com/dudango/guest-writer.git","ssh_url":"git@github.com:dudango/guest-writer.git","clone_url":"https://github.com/dudango/guest-writer.git","svn_url":"https://github.com/dudango/guest-writer","homepage":null,"size":142,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"auth0-blog:master","ref":"master","sha":"997ccfc886a8ccf4fc9385ca9d0663958f648e33","user":{"login":"auth0-blog","id":18200246,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MjAwMjQ2","avatar_url":"https://avatars0.githubusercontent.com/u/18200246?v=4","gravatar_id":"","url":"https://api.github.com/users/auth0-blog","html_url":"https://github.com/auth0-blog","followers_url":"https://api.github.com/users/auth0-blog/followers","following_url":"https://api.github.com/users/auth0-blog/following{/other_user}","gists_url":"https://api.github.com/users/auth0-blog/gists{/gist_id}","starred_url":"https://api.github.com/users/auth0-blog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auth0-blog/subscriptions","organizations_url":"https://api.github.com/users/auth0-blog/orgs","repos_url":"https://api.github.com/users/auth0-blog/repos","events_url":"https://api.github.com/users/auth0-blog/events{/privacy}","received_events_url":"https://api.github.com/users/auth0-blog/received_events","type":"Organization","site_admin":false},"repo":{"id":113334586,"node_id":"MDEwOlJlcG9zaXRvcnkxMTMzMzQ1ODY=","name":"guest-writer","full_name":"auth0-blog/guest-writer","owner":{"login":"auth0-blog","id":18200246,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MjAwMjQ2","avatar_url":"https://avatars0.githubusercontent.com/u/18200246?v=4","gravatar_id":"","url":"https://api.github.com/users/auth0-blog","html_url":"https://github.com/auth0-blog","followers_url":"https://api.github.com/users/auth0-blog/followers","following_url":"https://api.github.com/users/auth0-blog/following{/other_user}","gists_url":"https://api.github.com/users/auth0-blog/gists{/gist_id}","starred_url":"https://api.github.com/users/auth0-blog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auth0-blog/subscriptions","organizations_url":"https://api.github.com/users/auth0-blog/orgs","repos_url":"https://api.github.com/users/auth0-blog/repos","events_url":"https://api.github.com/users/auth0-blog/events{/privacy}","received_events_url":"https://api.github.com/users/auth0-blog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/auth0-blog/guest-writer","description":"A repository to smooth the process for guest writers.","fork":false,"url":"https://api.github.com/repos/auth0-blog/guest-writer","forks_url":"https://api.github.com/repos/auth0-blog/guest-writer/forks","keys_url":"https://api.github.com/repos/auth0-blog/guest-writer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/auth0-blog/guest-writer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/auth0-blog/guest-writer/teams","hooks_url":"https://api.github.com/repos/auth0-blog/guest-writer/hooks","issue_events_url":"https://api.github.com/repos/auth0-blog/guest-writer/issues/events{/number}","events_url":"https://api.github.com/repos/auth0-blog/guest-writer/events","assignees_url":"https://api.github.com/repos/auth0-blog/guest-writer/assignees{/user}","branches_url":"https://api.github.com/repos/auth0-blog/guest-writer/branches{/branch}","tags_url":"https://api.github.com/repos/auth0-blog/guest-writer/tags","blobs_url":"https://api.github.com/repos/auth0-blog/guest-writer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/auth0-blog/guest-writer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/auth0-blog/guest-writer/git/refs{/sha}","trees_url":"https://api.github.com/repos/auth0-blog/guest-writer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/auth0-blog/guest-writer/statuses/{sha}","languages_url":"https://api.github.com/repos/auth0-blog/guest-writer/languages","stargazers_url":"https://api.github.com/repos/auth0-blog/guest-writer/stargazers","contributors_url":"https://api.github.com/repos/auth0-blog/guest-writer/contributors","subscribers_url":"https://api.github.com/repos/auth0-blog/guest-writer/subscribers","subscription_url":"https://api.github.com/repos/auth0-blog/guest-writer/subscription","commits_url":"https://api.github.com/repos/auth0-blog/guest-writer/commits{/sha}","git_commits_url":"https://api.github.com/repos/auth0-blog/guest-writer/git/commits{/sha}","comments_url":"https://api.github.com/repos/auth0-blog/guest-writer/comments{/number}","issue_comment_url":"https://api.github.com/repos/auth0-blog/guest-writer/issues/comments{/number}","contents_url":"https://api.github.com/repos/auth0-blog/guest-writer/contents/{+path}","compare_url":"https://api.github.com/repos/auth0-blog/guest-writer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/auth0-blog/guest-writer/merges","archive_url":"https://api.github.com/repos/auth0-blog/guest-writer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/auth0-blog/guest-writer/downloads","issues_url":"https://api.github.com/repos/auth0-blog/guest-writer/issues{/number}","pulls_url":"https://api.github.com/repos/auth0-blog/guest-writer/pulls{/number}","milestones_url":"https://api.github.com/repos/auth0-blog/guest-writer/milestones{/number}","notifications_url":"https://api.github.com/repos/auth0-blog/guest-writer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/auth0-blog/guest-writer/labels{/name}","releases_url":"https://api.github.com/repos/auth0-blog/guest-writer/releases{/id}","deployments_url":"https://api.github.com/repos/auth0-blog/guest-writer/deployments","created_at":"2017-12-06T15:38:49Z","updated_at":"2018-09-01T14:39:53Z","pushed_at":"2018-09-10T04:34:18Z","git_url":"git://github.com/auth0-blog/guest-writer.git","ssh_url":"git@github.com:auth0-blog/guest-writer.git","clone_url":"https://github.com/auth0-blog/guest-writer.git","svn_url":"https://github.com/auth0-blog/guest-writer","homepage":null,"size":138,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":23,"open_issues":5,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/auth0-blog/guest-writer/pulls/28"},"html":{"href":"https://github.com/auth0-blog/guest-writer/pull/28"},"issue":{"href":"https://api.github.com/repos/auth0-blog/guest-writer/issues/28"},"comments":{"href":"https://api.github.com/repos/auth0-blog/guest-writer/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/auth0-blog/guest-writer/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/auth0-blog/guest-writer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/auth0-blog/guest-writer/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/auth0-blog/guest-writer/statuses/fd2ffa1d3fd3ac17a25715e32c15da85b2a4ddf1"}},"author_association":"NONE"}}
{"actor":{"display_login":"brunokrebs"}}