Skip to main content

Posts

Showing posts with the label flask

Getting Started with Flask

In this post, I will give you a very basic example to run a hello world program in flask. What make it different with the other tutorial is that this will enable your program to run from a cloud server, not just on a local server. Before we go further Because you want to run it in a cloud server, most probably you will use your ssh to connect and run it. However, you need to know that when you end your ssh session, your Flask server will also be shut down. To prevent that, my favourite is to use screen . If you are ubuntu lover like me, you can install it by typing $ sudo apt-get install -y screen Before you do any work, start by typing $ screen It will open a session for you. Later, after you run your Flask server, you may want to detach the session using this command ctrl-a d If you later want to go back to your session, you can do it by using the following command $ screen -r OK, without further ado, this is your first hello world program in Fl...