mirror of
https://github.com/notrab/dumbo.git
synced 2025-01-17 14:18:14 +01:00
25 lines
387 B
Markdown
25 lines
387 B
Markdown
|
# Context Example
|
||
|
|
||
|
This example demonstrates how to `get` and `set` custom variables on the root, and route middleware.
|
||
|
|
||
|
## Running the Example
|
||
|
|
||
|
1. Install dependencies:
|
||
|
|
||
|
```bash
|
||
|
composer install
|
||
|
```
|
||
|
|
||
|
2. Start the server:
|
||
|
|
||
|
```bash
|
||
|
composer start
|
||
|
```
|
||
|
|
||
|
3. Access the protected route:
|
||
|
|
||
|
```bash
|
||
|
curl http://localhost:8000
|
||
|
curl http://localhost:8000/api
|
||
|
```
|