-
I grabbed the code from here import flet
from flet import IconButton, Page, Row, TextField, icons
def main(page: Page):
page.title = "Flet counter example"
page.vertical_alignment = "center"
txt_number = TextField(value="0", text_align="right", width=100)
def minus_click(e):
txt_number.value = int(txt_number.value) - 1
page.update()
def plus_click(e):
txt_number.value = int(txt_number.value) + 1
page.update()
page.add(
Row(
[
IconButton(icons.REMOVE, on_click=minus_click),
txt_number,
IconButton(icons.ADD, on_click=plus_click),
],
alignment="center",
)
)
flet.app(target=main, view=flet.WEB_BROWSER) I was just wondering if I could deploy this on a cloud platform like heroku ( what should be the procfile ) ... it would be great if I could link it with a backend of my project ( fastapi + tortoise-orm ) ... thanks |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
Hey, I've been looking into doing Heroku deployment guide, but then got distracted :) Do you have experience with Heroku? If you bear with me we could go through the process together and do a guide for others! As far as I know they offer two deployment models at least: 1) git deployment and 2) Docker deployment. Which one are you thinking about? |
Beta Was this translation helpful? Give feedback.
-
OK, looking at https://devcenter.heroku.com/articles/procfile#the-web-process-type and https://stackoverflow.com/a/18670597/1435891 I guess we should have just Will give it a try tomorrow. |
Beta Was this translation helpful? Give feedback.
-
But just to confirm you are looking into connecting your Heroku app to a GitHub repo, right? |
Beta Was this translation helpful? Give feedback.
-
Here you go: https://github.com/flet-dev/flet-heroku-app |
Beta Was this translation helpful? Give feedback.
-
Cloning the repo as is and deploying it using the official python-buildpack gives an
Reading more into the logs Running: ( I am leaving this here if anyone encounters this error in the future, and thanks for the amazing library ^^ ) |
Beta Was this translation helpful? Give feedback.
Cloning the repo as is and deploying it using the official python-buildpack gives an
Application Error
. These are the logs :