From 5eae4fc33d4c5fa6385257d31ceb963940ee94f1 Mon Sep 17 00:00:00 2001 From: Parth Shah <142086512+Parth20GitHub@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:12:10 +0530 Subject: [PATCH 1/2] Rename WebSockets.md to WebSocket-for-realtime.md --- docs/{WebSockets.md => WebSocket-for-realtime.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/{WebSockets.md => WebSocket-for-realtime.md} (100%) diff --git a/docs/WebSockets.md b/docs/WebSocket-for-realtime.md similarity index 100% rename from docs/WebSockets.md rename to docs/WebSocket-for-realtime.md From 47316d222d5c386f5c2e0f12b2433286c8445db7 Mon Sep 17 00:00:00 2001 From: Parth Shah <129427541+Ps1220@users.noreply.github.com> Date: Fri, 26 Jul 2024 16:08:49 +0530 Subject: [PATCH 2/2] done --- docs/Flask/11-Flask app on Heroku.md | 50 ++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 docs/Flask/11-Flask app on Heroku.md diff --git a/docs/Flask/11-Flask app on Heroku.md b/docs/Flask/11-Flask app on Heroku.md new file mode 100644 index 000000000..930016f58 --- /dev/null +++ b/docs/Flask/11-Flask app on Heroku.md @@ -0,0 +1,50 @@ +--- +id: Deploy Python Flask App on Heroku +title: how to deploy a flask app on Heroku +sidebar_label: Flask App on Heroku +sidebar_position: 11 +tags: [flask, python, heroku ] +description: In this tutorial, you will learn about deployment offlask app on Heroku. +--- + + Flask is based on the Werkzeug WSGI toolkit and Jinja2 template engine. Both are Pocco projects. This article revolves around how to deploy a flask app on Heroku. To demonstrate this, we are first going to create a sample application for a better understanding of the process. + +The Prerequisites are- +1.Python +2.pip +3.Heroku CLI +4.Git + +### Deploying Flask App on Heroku + +Let’s create a simple flask application first and then it can be deployed to heroku. Create a folder named “eflask” and open the command line and cd inside the “eflask” directory. Follow the following steps to create the sample application for this tutorial. + + # STEP 1 : + Create a virtual environment with pipenv and install Flask and Gunicorn . + + # STEP 2 : + Create a “Procfile” and write the following code. + + # STEP 3 : + Create “runtime.txt” and write the following code. + + # STEP 4 : + Create a folder named “app” and enter the folder + + # STEP 5 : + Create a python file, “main.py” and enter the sample code. + + # STEP 6 : + Get back to the previous directory “eflask”.Create a file“wsgi.py” and insert the following code. + + # STEP 7 : + Run the virtual environment. + +# STEP 8 : + Initialize an empty repo, add the files in the repo and commit all the changes. + +# STEP 9 : +Login to heroku CLI + +# STEP 10 : +Push your code from local to the heroku remote.