generated from Luis/nextjs-python-web-template
consumptions apiendpoint #47
@@ -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:
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user