18 lines
256 B
Markdown
18 lines
256 B
Markdown
# SlowAPI
|
|
|
|
A barely working HTTP server
|
|
|
|
```py
|
|
from slow import App, render
|
|
|
|
app = App()
|
|
|
|
@app.GET("/")
|
|
def home(request):
|
|
return render("index.html")
|
|
|
|
import asyncio
|
|
if __name__ == "__main__":
|
|
asyncio.run(app.run(host="localhost", port=8080))
|
|
|
|
``` |