consumptions apiendpoint #47

Merged
Ghost merged 1 commits from georgs_consumption into main 2024-01-10 15:39:12 +00:00
2 changed files with 5 additions and 0 deletions

View File

@@ -78,6 +78,8 @@ sudo echo "experimental-features = nix-command flakes" > '/etc/nix/nix.conf'
- The server will automatically restart if any Python files change. - The server will automatically restart if any Python files change.
- The `--populate` flag will automatically populate the database with dummy data - The `--populate` flag will automatically populate the database with dummy data
- To emulate some distributed system behavior run `python3 tests/emulate_fastapi.py`
8. **Build the Frontend**: 8. **Build the Frontend**:
- In a different shell, navigate to the `pkgs/ui` directory and execute: - In a different shell, navigate to the `pkgs/ui` directory and execute:

View File

@@ -1,3 +1,5 @@
import time
import uvicorn import uvicorn
from fastapi import FastAPI from fastapi import FastAPI
from fastapi.responses import HTMLResponse from fastapi.responses import HTMLResponse
@@ -21,6 +23,7 @@ async def consume_service_from_other_entity() -> HTMLResponse:
</body> </body>
</html> </html>
""" """
time.sleep(3)
return HTMLResponse(content=html_content, status_code=200) return HTMLResponse(content=html_content, status_code=200)