8000 Merge pull request #76 from tecladocode/jose/cou-211-web-dev-re-creat… · tecladocode/web-dev-bootcamp@97004de · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 97004de

Browse files
authored
Merge pull request #76 from tecladocode/jose/cou-211-web-dev-re-create-diff-store-links-for
2 parents da4e39b + 29f0544 commit 97004de

File tree

54 files changed

+84
-110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+84
-110
lines changed

curriculum/section07/lectures/08_setting_up_microblog_with_flask/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ draft: false
1414
# Setting up the Microblog project with Flask
1515

1616
::: tip
17-
List of all code changes made in this lecture: [https://diff-store.com/diff/60ac442d39c7427d815e1d4abd74526d](https://diff-store.com/diff/60ac442d39c7427d815e1d4abd74526d)
17+
List of all code changes made in this lecture: [https://diff-store.com/diff/section07__08_setting_up_microblog_with_flask](https://diff-store.com/diff/section07__08_setting_up_microblog_with_flask)
1818
:::

curriculum/section07/lectures/09_receive_form_data_flask/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ draft: false
1414
# Receiving form data using Flask
1515

1616
::: tip
17-
List of all code changes made in this lecture: [https://diff-store.com/diff/475b5a22fd4b4d8194c1825889c6770e](https://diff-store.com/diff/475b5a22fd4b4d8194c1825889c6770e)
17+
List of all code changes made in this lecture: [https://diff-store.com/diff/section07__09_receive_form_data_flask](https://diff-store.com/diff/section07__09_receive_form_data_flask)
1818
:::

curriculum/section07/lectures/10_display_past_entries_microblog/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ draft: false
1414
# Displaying past entries in the Microblog project
1515

1616
::: tip
17-
List of all code changes made in this lecture: [https://diff-store.com/diff/295f249cf29e46918c8d8391699f7c02](https://diff-store.com/diff/295f249cf29e46918c8d8391699f7c02)
17+
List of all code changes made in this lecture: [https://diff-store.com/diff/section07__10_display_past_entries_microblog](https://diff-store.com/diff/section07__10_display_past_entries_microblog)
1818
:::

curriculum/section07/lectures/11_formatting_dates_correctly_microblog/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ draft: false
1414
# Formatting dates correctly in our entries
1515

1616
::: tip
17-
List of all code changes made in this lecture: [https://diff-store.com/diff/d183b361cc8d4b0d9626a4bdf4f93644](https://diff-store.com/diff/d183b361cc8d4b0d9626a4bdf4f93644)
17+
List of all code changes made in this lecture: [https://diff-store.com/diff/section07__11_formatting_dates_correctly_microblog](https://diff-store.com/diff/section07__11_formatting_dates_correctly_microblog)
1818
:::

curriculum/section07/lectures/14_storing_entries_mongodb/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ draft: false
1414
# Storing Microblog entries in MongoDB
1515

1616
::: tip
17-
List of all code changes made in this lecture: [https://diff-store.com/diff/0c3715d611e148a78f6150003f689f74](https://diff-store.com/diff/0c3715d611e148a78f6150003f689f74)
17+
List of all code changes made in this lecture: [https://diff-store.com/diff/section07__14_storing_entries_mongodb](https://diff-store.com/diff/section07__14_storing_entries_mongodb)
1818
:::

curriculum/section07/lectures/15_retrieving_entries_mongodb/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ draft: false
1414
# Retrieving Microblog entries from MongoDB
1515

1616
::: tip
17-
List of all code changes made in this lecture: [https://diff-store.com/diff/6e3c246e29ad46f6a9ac1e71d2876b37](https://diff-store.com/diff/6e3c246e29ad46f6a9ac1e71d2876b37)
17+
List of all code changes made in this lecture: [https://diff-store.com/diff/section07__15_retrieving_entries_mongodb](https://diff-store.com/diff/section07__15_retrieving_entries_mongodb)
1818
:::

curriculum/section07/lectures/16_flask_app_factory_pattern/README.md

Lines changed: 1 addition & 1 deletion
10000
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ draft: false
1414
# Using Flask's app factory pattern
1515

1616
::: tip
17-
List of all code changes made in this lecture: [https://diff-store.com/diff/b474a5eb637c475db58af2bae2dab9b9](https://diff-store.com/diff/b474a5eb637c475db58af2bae2dab9b9)
17+
List of all code changes made in this lecture: [https://diff-store.com/diff/section07__16_flask_app_factory_pattern](https://diff-store.com/diff/section07__16_flask_app_factory_pattern)
1818
:::
Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
11
---
2-
title: What is Heroku?
3-
slug: what-is-heroku
2+
title: What do deployment services do for us?
3+
slug: what-do-deployment-services-do
44
tags:
55
- Concept
66
- Published
77
categories:
88
- Presentation
9-
section_number: 8
10-
excerpt: "Learn about what Heroku is and how it can help us share our application with users."
9+
section\_number: 8
10+
excerpt: "Learn about what deployment services like Render.com do for us."
1111
draft: false
1212
---
1313

14-
# What is Heroku?
14+
# What do deployment services do for us?
1515

16-
This is a presentation lecture without a transcript. For now, it's only available in the Udemy course!
16+
When we run our app, people and programs can make requests to the address the app is running on. When we run our app with `flask run`, this starts a development server which is in charge of receiving those requests and sending them over to the Flask app. The app then runs the Python function and calculates the response.
17+
18+
For security reasons, when we run our app locally, people outside our network can't make requests to it. So if we want our app to be publicly available, we must deploy it somewhere that doesn't have this restriction.
19+
20+
Deployment services companies like Render.com or Heroku, run our applications in publicly accessible services and they give us a URL that we can use to make requests to the application.
21+
22+
These companies make it really easy to deploy our apps by taking care of provisioning hardware, setting it up, installing dependencies, etc. This kind of business is known as a PaaS: "Platform as a service."
23+
24+
If you don't mind doing some more work yourself, for example by setting up each individual server, then you can save money by renting servers directly. The benefit of this is you can run multiple applications in a single server and you get more flexibility. This can save money, but takes a lot more work. Plus, PaaS applications can do things like restart our services if they crash, they can handle backups and deployments, and much more. Overall, I think using a PaaS makes a lot of sense, especially for smaller applications.
25+
26+
Render.com has a generous free plan which means we can use their services for free. There are some limitations however. We only get 1500 hours per month, and builds are a bit slower than on paid plans (so when you deploy, it takes a few minutes for your application to run).
27+
28+
Let's get started in the next lecture!
Lines changed: 7 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,21 @@
11
---
2-
title: Getting our app ready for Heroku
3-
slug: getting-our-app-ready-for-heroku
2+
title: Getting our app ready for Render
3+
slug: getting-our-app-ready-for-render
44
tags:
55
- Project
66
- Published
77
categories:
88
- Video
99
section_number: 8
10-
excerpt: "Here we'll add some files that Heroku needs in order to run our application."
10+
excerpt: "Here we'll add some files that Render needs in order to run our application."
1111
draft: false
1212
---
1313

14-
- [Getting our app ready for Heroku](#getting-our-app-ready-for-heroku)
15-
- [The `runtime.txt` file](#the-runtimetxt-file)
16-
- [The `Procfile` file](#the-procfile-file)
17-
- [Install `gunicorn` in Heroku](#install-gunicorn-in-heroku)
14+
- [Getting our app ready for Render](#getting-our-app-ready-for-render)
1815

19-
# Getting our app ready for Heroku
16+
# Getting our app ready for Render
2017

21-
We need to tell Heroku:
18+
We need to add `gunicorn` to our `requirements.txt` file before we deploy to Render.
2219

23-
- What language our app uses.
24-
- How to run our app.
25-
- The dependencies required for our app.
20+
You won't be able to run `gunicorn` in Windows, but you can install it. In other platforms, you should be able to run `gunicorn`. Either way, you'll be using `flask run` to run your app locally most of the time. We'll only use `gunicorn` in Render.com for performance benefits.
2621

27-
We do this with three different files:
28-
29-
- `runtime.txt`, for the language.
30-
- `Procfile`, for "how to run the app".
31-
- `requirements.txt`, for the dependencies.
32-
33-
## The `runtime.txt` file
34-
35-
Here we want to tell Heroku what language and what version to use.
36-
37-
The contents of this file are very specific. You need to pick from the available languages and versions here: [https://devcenter.heroku.com/articles/python-runtimes](https://devcenter.heroku.com/articles/python-runtimes).
38-
39-
In our case, we're going with this content inside the file:
40-
41-
```
42-
python-3.10.2
43-
```
44-
45-
::: tip
46-
Other versions (e.g. older versions of Python) may also work. See this link for more information: https://devcenter.heroku.com/articles/python-support#supported-runtimes
47-
:::
48-
49-
## The `Procfile` file
50-
51-
::: warning
52-
The file should be called `Procfile`, and **not** `Procfile.txt`!
53-
:::
54-
55-
Here we're going to tell Heroku how to run our app:
56-
57-
```
58-
web: gunicorn "app:create_app()"
59-
```
60-
61-
This uses the `web` dyno type, and in it executes the `gunicorn "app:create_app()"` command. That will start our app with `gunicorn` serving it.
62-
63-
## Install `gunicorn` in Heroku
64-
65-
We need to add `gunicorn` to our `requirements.txt` file before we deploy to Heroku.
66-
67-
You won't be able to run `gunicorn` in Windows, but you can install it. In other platforms, you should be able to run `gunicorn`. Either way, you'll be using `flask run` to run your app locally most of the time.

curriculum/section09/lectures/02_new_jinja2_variables/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ draft: false
2525
## TL;DR (on this video...)
2626

2727
::: tip
28-
List of all code changes made in this lecture: [https://diff-store.com/diff/925a06fbecaf46fd998785a731e18af3](https://diff-store.com/diff/925a06fbecaf46fd998785a731e18af3)
28+
List of all code changes made in this lecture: [https://diff-store.com/diff/section09__02_new_jinja2_variables](https://diff-store.com/diff/section09__02_new_jinja2_variables)
2929
:::
3030

3131
Learn how to create variables inside a template, so that you can calculate values and re-use them in multiple places within a template.

0 commit comments

Comments
 (0)
0