File tree 7 files changed +57
-0
lines changed
7 files changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ 3.10
Original file line number Diff line number Diff line change
1
+ from flask import Flask
2
+ import os
3
+
4
+ app = Flask (__name__ )
5
+
6
+ @app .route ('/' )
7
+ def hello_world ():
8
+ return 'Hello, world!'
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # pwd
4
+ # ls -la
5
+ # ls -la ./bin
6
+ # env | sort
7
+ # echo $PATH
8
+
9
+ # export FLASK_APP=app
10
+ # export FLASK_ENV=production
11
+
12
+ # python --version
13
+
14
+ # python server.py
15
+
16
+ # gunicorn -w 1 'server:app'
17
+ # python -m flask run --host=0.0.0.0 --port 3000
18
+ # ./flask run
19
+
20
+
21
+ # This works
22
+ # python gunicorn_runner.py
23
+
24
+
25
+ PYTHONUNBUFFERED=TRUE python uvicorn_runner.py
Original file line number Diff line number Diff line change
1
+ click == 8.1.3
2
+ Flask == 2.1.1
3
+ gunicorn == 20.1.0
4
+ h11 == 0.14.0
5
+ itsdangerous == 2.1.2
6
+ Jinja2 == 3.1.2
7
+ MarkupSafe == 2.1.2
8
+ python-dotenv == 1.0.0
9
+ uvicorn == 0.22.0
10
+ waitress == 2.1.2
11
+ Werkzeug == 2.3.4
Original file line number Diff line number Diff line change
1
+ import sys
2
+ from gunicorn .app .wsgiapp import run
3
+ if __name__ == '__main__' :
4
+ sys .argv = "gunicorn --bind 0.0.0.0:5151 app:app" .split ()
5
+ sys .exit (run ())
Original file line number Diff line number Diff line change
1
+ <!doctype html>
2
+ < title > Hello from Flask</ title >
3
+ {% if name %}
4
+ < h1 > Hello {{ name }}!</ h1 >
5
+ {% else %}
6
+ < h1 > Hello, World!</ h1 >
7
+ {% endif %}
You can’t perform that action at this time.
0 commit comments