Skip to content

flet-dev/flet-heroku-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Flet app hosted on Heroku

This is an example Flet app that can be deployed to Heroku as a web app.

Use this repository as a starting point for your own app.

In Heroku choose "GitHub" deployment method and select the repository.

A new deployment will automatically start on every push to the repository.

Key points to make Heroku work:

  1. Procfile - nothing fancy, just running python {your_program.py} as a web process.
  2. requirements.txt - the list of Python modules required by your program, including flet.
  3. main.py - use TCP port binding provided by Heroku environment.

Heroku dynamically assigns your app a port and add its value to PORT environment variable. To make Flet app using that port you should add import os to your Flet program and modify flet.app() to use that port:

import os

# the rest of your program

flet.app(target=main, port=os.getenv("PORT"))

About

Hosting Flet app on Heroku

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.5%
  • Procfile 0.5%