commit 2c1de4924cba96937529ae80722153c352fac023 Author: Shivering Ocelot Date: Sun May 4 15:40:58 2025 -0500 Basic Quart server in backend directory diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1d17dae --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.venv diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ebb8f23 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +VENV_DIR := .venv + +install: + @if [ ! -d "$(VENV_DIR)" ]; then \ + python3 -m venv $(VENV_DIR); \ + fi + @$(VENV_DIR)/bin/pip install -r backend/requirements.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..7f6f919 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# Backend + +To run the Flask server, follow these steps: + +1. Build and activate the virtual environment and install the required dependencies: + ```bash + make install + ``` +2. Run the server using the provided script: + ```bash + ./run.sh + ``` + +Now, visit `http://127.0.0.1:5000` in your web browser to see the application in action. \ No newline at end of file diff --git a/backend/app.py b/backend/app.py new file mode 100644 index 0000000..a3dacb9 --- /dev/null +++ b/backend/app.py @@ -0,0 +1,10 @@ +from quart import Quart + +app = Quart(__name__) + +@app.route('/') +async def hello(): + return "Hello, Quart!" + +if __name__ == "__main__": + app.run(debug=True) diff --git a/backend/requirements.txt b/backend/requirements.txt new file mode 100644 index 0000000..f8d6ab2 --- /dev/null +++ b/backend/requirements.txt @@ -0,0 +1 @@ +Quart==0.20.0 diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..638f34a --- /dev/null +++ b/run.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd backend +source ../.venv/bin/activate +python app.py