Skip to content

Instantly share code, notes, and snippets.

View sebbekarlsson's full-sized avatar
🐧
Programming

Sebastian Karlsson (ianertson) sebbekarlsson

🐧
Programming
View GitHub Profile
@sebbekarlsson
sebbekarlsson / python-flask-nginx.md
Last active June 25, 2021 21:04
Creating a simple web application in Python and running it under Nginx

Python web application with Nginx

Let us create a simple API in Python and serving it using Nginx.

In this example we will use Debian 9 as a distro for the server.

The code

Alright, let's write some code.
We will create an API that will serve an array of fruits.

Let's create a __main__.py file: