https://github.com/encode/starlette-example
An example Starlette application
https://github.com/encode/starlette-example
Last synced: 6 months ago
JSON representation
An example Starlette application
- Host: GitHub
- URL: https://github.com/encode/starlette-example
- Owner: encode
- Created: 2018-11-08T12:35:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-10T10:40:47.000Z (about 3 years ago)
- Last Synced: 2025-04-09T11:46:30.939Z (8 months ago)
- Language: HTML
- Size: 297 KB
- Stars: 230
- Watchers: 10
- Forks: 50
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# An example Starlette application
Install and run:
```shell
git clone https://github.com/encode/starlette-example.git
cd starlette-example
scripts/install
scripts/run
```
Open `http://127.0.0.1:8000/` in your browser:

Navigate to path that is not routed, eg `http://127.0.0.1:8000/nope`:

Raise a server error by navigating to `http://127.0.0.1:8000/error`:

Switch the `app = Starlette(debug=True)` line to `app = Starlette()` to see a regular 500 page instead.