Menu

How to Deploy a Flask App Online for Free
📰

How to Deploy a Flask App Online for Free

DEV Community: flask·Ekpetchou Achille Ezoba·16 days ago
#ig1NGcqC
#devtoflask#devto#dev#flask#github
Long article (480 words) — no AI summary yet.
Reading 0:00
15s threshold

You built a Flask app that works on your computer. Now you want other people to use it. Here is a simple, free way to put it online.

Before you start

A working Flask app (even a very small one)

A free GitHub account

A free account on a hosting service such as Render

Free plans change over time and have limits (for example, a free app may go to sleep after a period without visitors), so check the current terms on the hosting site.

Step 1: Prepare your project

Your project folder should look like this:

my-app/ app.py requirements.txt templates/ static/

Enter fullscreen mode

Exit fullscreen mode

Here is a minimal app.py :

from flask import Flask

app = Flask ( __name__ )

@app . route ( "/" ) def home ( ) : return "Hello from my Flask app!"

Enter fullscreen mode

Exit fullscreen mode

Step 2: List your dependencies

Create a file called requirements.txt that names every package your app needs.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.