English / δΈζ
flask-server-template is a framework designed for quickly setting up lightweight web applications. The main entry point is the server::handler
function in the server.py
file. Your code development primarily focuses on this file.
Below is a simple guide on how to use this repository:
To get started, install the project dependencies by running the following command:
pip install -r requirements.txt
In the server.py
file, write your function code. For example:
def handler():
<your code>
Start the web application in the background, assuming the startup port is 8099
:
nohup gunicorn -b 127.0.0.1:8099 server:app &
Use the curl
command to verify if the web application service is running correctly:
curl --location --request POST 'http://127.0.0.1:8099'
In less than five minutes, you will have a fully functional web application ready to go :)