Skip to content

Commit

Permalink
docs: fix middleware section in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sansyrox committed Nov 18, 2022
1 parent 35f4cc0 commit 4f9e249
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,14 @@ model User {
### Using Middleware
```python

from robyn import Robyn, static_file
@app.before_request("/")
async def hello_before_request(request):
print(request)

app = Robyn(__file__)

@app.get("/")
async def h(request):
return static_file("./index.html")

app.start(port=5000)
@app.after_request("/")
def hello_after_request(request):
print(request)

```

Expand Down

0 comments on commit 4f9e249

Please sign in to comment.