fix(14.3-01): ship http body limits in examples/hello
- add examples/hello/config/http.yaml so serve, route:list and TestTypedItemRoute work without a manual config step - drop the matching setup step and known-issue notes from README.md and docs/setup/installation.md
This commit is contained in:
@@ -90,15 +90,7 @@ CREATE DATABASE hello;
|
||||
|
||||
Configuration comes from YAML files in `config/`. Any key can be overridden with a `SUMMER_` environment variable, in which a double underscore separates path segments: `SUMMER_DATABASE__DSN` sets `database.dsn`. [Configuration](configuration.md) explains the layers.
|
||||
|
||||
`serve` and `route:list` need request body limits, and surf reads them as numbers, which the string-valued environment overlay cannot supply. Create `config/http.yaml` in `examples/hello`:
|
||||
|
||||
```yaml
|
||||
body_limits:
|
||||
default_bytes: 1048576
|
||||
upload_bytes: 10485760
|
||||
```
|
||||
|
||||
Then point the binary at the database, give it the application key and an uploads bucket. Replace the `<secret>` markers with your own values, and never commit them:
|
||||
Point the binary at the database, give it the application key and an uploads bucket. Replace the `<secret>` markers with your own values, and never commit them:
|
||||
|
||||
```sh
|
||||
export SUMMER_DATABASE__DSN='postgres://acme:<secret>@127.0.0.1:5432/hello?sslmode=disable'
|
||||
@@ -122,7 +114,6 @@ From the application directory, `summer migrate`, `summer migrate:status` and `s
|
||||
> [!WARNING]
|
||||
> Known issues in the current framework:
|
||||
>
|
||||
> - `examples/hello` ships no `http.body_limits` configuration, so `serve` and `route:list` fail with `surf: config http.body_limits.default_bytes is required` until you add `config/http.yaml` as shown above. The same gap makes the example's `TestTypedItemRoute` fail.
|
||||
> - The committed `examples/hello/main.go` is older than what `summer build` generates now, so building the example leaves that file modified. Restore it with `git checkout -- examples/hello/main.go` if you do not intend to commit it.
|
||||
|
||||
## Next steps
|
||||
|
||||
Reference in New Issue
Block a user