Basic Quart server in backend directory
This commit is contained in:
commit
2c1de4924c
6 files changed
+37
No files matched your search
@@ -0,0 +1 @@
|
|||||||
|
.venv
|
||||||
@@ -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
|
||||||
@@ -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.
|
||||||
@@ -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)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Quart==0.20.0
|
||||||
Reference in new issue
Block a user