I have the to_Do_app model that the Flet documentation gives, and i am trying to learn how upload it to an azure server in a way to learn how Azure works. But investigating there is not clear information about it. I’ll be grateful if someone teach me if is it possible and how.
The only thing i found is this textbut im still not sure if the framework its not compatible with Azure for now.
This is the code that i want to upload.
https://github.com/flet-dev/examples/tree/5c16ccc21c41c3acf9221dec8bac5127a3871b4f/python/apps/todo
2
Answers
I tried the sample code and successfully deployed it to the Azure app service.
I ran the commands below for the virtual environment:
python -m venv venv
.venvScriptsactivate
.requirements.txt:
I added this
flet.app(target=main, view=flet.AppView.WEB_BROWSER)
to the end of main.py for deployment as a web app.main. py:
I ran the command below:
python main.py
Local Output:
I ran the command below to generate a "dist" folder for deployment purposes.
flet publish main.py
I created an Azure web app in the Azure portal, selected the runtime stack as Node 18, and chose the operating system as Windows, as shown below.
I deployed a web app to Azure App Service through VS Code, as shown below.
Azure App Service Output:
Thanks for the guide. I tried your method and got further than I have before. I have managed to deploy my app to azure from VS Code, but when I go to the URL to view the app, I just get the spinning flet loading icon.
Any ideas what I’ve missed?
Thanks