| 1 |
from litestar import Litestar, get |
| 2 |
|
| 3 |
|
| 4 |
@get("/", sync_to_thread=False) |
| 5 |
def index() -> str: |
| 6 |
return "Index Page" |
| 7 |
|
| 8 |
|
| 9 |
@get("/hello", sync_to_thread=False) |
| 10 |
def hello() -> str: |
| 11 |
return "Hello, World" |
| 12 |
|
| 13 |
|
| 14 |
app = Litestar(route_handlers=[index, hello]) |