Flask is a web framework. This means flask provides you with tools, libraries and technologies that allow you to build a web application. This web application can be some web pages, a blog, a wiki or go as big as a web-based calendar application or a commercial website. (https://pymbook.readthedocs.io/en/latest/flask.html)
Create a virtual environment. This is a contained workspace where you can install packages and libraries. It is useful in order to keep track of external dependencies, avoid version conflicts, and it provides handy tools to share your workplace with others or install it somewhere else later on. Read more in the [wiki ⛄︎](https://git.xpub.nl/manetta/flask-example/wiki/venv)!
The address `http://127.0.0.1` is actually the address of your local computer, also known as `localhost`. If you try and change the url into `localhost:3000` the result should be the same!
When you want to publish the Flask app online, the easiest way to do it(and manage your project/app) is to use __git__ to keep in sync with your local project/app.
When working with git, it could happen that you don't want to push all your files in the repository. (For privacy reason, or environmental reason etc.) That is the case for example with the `venv` folder, or for other files related to your configurations such as `.env` files, API keys, passwords, etc.
To manage what is going to be pushed or not you can use a `.gitignore` file.
In this specific example we are gonna ignore the virtual environment and its contents, as well as some [annoying hidden files](https://en.wikipedia.org/wiki/.DS_Store) generated by our dear machines.
```
venv/
.env
.DS_Store
```
There are some `.gitignore` templates online.
You can find some here: [A collection of .gitignore templates](https://github.com/github/gitignore). Which one to use is related to the kind of project you are working on.
Your computer and the server are different machines, and they could require different configurations. The port where you are running the local Flask application could not be available in the server. Or you would need to add a prefix to the URL to make it works.
For example to work in the Soupboat your routes must begin with `/soupboat/flask-example`, while in the Breadcube `/breadcube/flask-example`, etc.
<!-- TODO: image for variable names, in this case 'flask-example' -->
It's not handy to keep these variables in the code, because then you need to change it every time when you want to run the app in a different environment.
Here are the variables we are using, __BUT__ keep in mind that you probably need to type different values depending on the server of your choice and URL etc!