begin mg tut framework in be

This commit is contained in:
finn 2024-07-31 23:56:27 -07:00
parent 9b79a3796b
commit becc234263
12 changed files with 60 additions and 5 deletions

3
.gitignore vendored
View File

@ -1,5 +1,6 @@
gitea/ gitea/
.env .env
pmb-pf/ pmb-pf/
backend/giapp.py venv

2
backend/.flaskenv Normal file
View File

@ -0,0 +1,2 @@
FLASK_APP=microblog.py

4
backend/README.md Normal file
View File

@ -0,0 +1,4 @@
pip:
pip install flask
pip install python-dotenv

6
backend/app/__init__.py Normal file
View File

@ -0,0 +1,6 @@
from flask import Flask
app = Flask(__name__)
from app import routes

7
backend/app/routes.py Normal file
View File

@ -0,0 +1,7 @@
from app import app
@app.route('/')
@app.route('/index')
def index():
return "Hello, World!"

2
backend/microblog.py Normal file
View File

@ -0,0 +1,2 @@
from app import app

8
backend/requirements.txt Executable file → Normal file
View File

@ -1,4 +1,8 @@
blinker==1.8.2
click==8.1.7
Flask==3.0.3 Flask==3.0.3
itsdangerous==2.2.0
Jinja2==3.1.4
MarkupSafe==2.1.5
python-dotenv==1.0.1
Werkzeug==3.0.3 Werkzeug==3.0.3
mysql-connector-python
pyuwsgi

View File

@ -1,2 +0,0 @@
Flask==2.0.1
mysql-connector==2.2.9

View File

@ -0,0 +1,11 @@
<html>
<head>
<title></title>
</head>
<body>
<h1>About</h1>
</body>
</html>

View File

@ -0,0 +1,9 @@
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>

View File

@ -0,0 +1,11 @@
<html>
<head>
<title></title>
</head>
<body>
<h1>Home</h1>
</body>
</html>