diff --git a/.gitignore b/.gitignore index b331f09..bd1860d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ gitea/ .env pmb-pf/ -backend/giapp.py +venv + diff --git a/backend/.flaskenv b/backend/.flaskenv new file mode 100644 index 0000000..046b50c --- /dev/null +++ b/backend/.flaskenv @@ -0,0 +1,2 @@ +FLASK_APP=microblog.py + diff --git a/backend/README.md b/backend/README.md new file mode 100644 index 0000000..c3fdd6b --- /dev/null +++ b/backend/README.md @@ -0,0 +1,4 @@ + +pip: +pip install flask +pip install python-dotenv diff --git a/backend/app/__init__.py b/backend/app/__init__.py new file mode 100644 index 0000000..5bdbcd0 --- /dev/null +++ b/backend/app/__init__.py @@ -0,0 +1,6 @@ +from flask import Flask + +app = Flask(__name__) + +from app import routes + diff --git a/backend/app/routes.py b/backend/app/routes.py new file mode 100644 index 0000000..05a0bd4 --- /dev/null +++ b/backend/app/routes.py @@ -0,0 +1,7 @@ +from app import app + +@app.route('/') +@app.route('/index') +def index(): + return "Hello, World!" + diff --git a/backend/microblog.py b/backend/microblog.py new file mode 100644 index 0000000..f099917 --- /dev/null +++ b/backend/microblog.py @@ -0,0 +1,2 @@ +from app import app + diff --git a/backend/app.py b/backend/oldapp.py similarity index 100% rename from backend/app.py rename to backend/oldapp.py diff --git a/backend/requirements.txt b/backend/requirements.txt old mode 100755 new mode 100644 index c189106..c1e99d5 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -1,4 +1,8 @@ +blinker==1.8.2 +click==8.1.7 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 -mysql-connector-python -pyuwsgi diff --git a/backend/requirements.txt.orig b/backend/requirements.txt.orig deleted file mode 100755 index 924a5fd..0000000 --- a/backend/requirements.txt.orig +++ /dev/null @@ -1,2 +0,0 @@ -Flask==2.0.1 -mysql-connector==2.2.9 diff --git a/backend/templates/about.html b/backend/templates/about.html new file mode 100644 index 0000000..7318c07 --- /dev/null +++ b/backend/templates/about.html @@ -0,0 +1,11 @@ + + + + + + + +

About

+ + + diff --git a/backend/templates/basictemp.html b/backend/templates/basictemp.html new file mode 100644 index 0000000..cbbcf44 --- /dev/null +++ b/backend/templates/basictemp.html @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/backend/templates/home.html b/backend/templates/home.html new file mode 100644 index 0000000..fa70d65 --- /dev/null +++ b/backend/templates/home.html @@ -0,0 +1,11 @@ + + + + + + + +

Home

+ + +