Simple flask api tutorial with REST methods
- Create virtual environment
python -m venv venv
- Activate virtual environment
#linux
source venv/bin/activate
#windows
.\venv\Scripts\actvate
- Install packages
pip install -r requirements.txt
- Run app
python -m flask run --host=0.0.0.0
- Create a build from present Dockerfile in this project
docker build --tag python-docker .
- Run Docker container created on step 1
docker run -d -p 5000:5000 python-docker
After runing with docker ou manualy on your machine, open a browser and navigate to http://localhost:5000 🎈