- build.NewApp writes sm-<name>-app: go.mod with a relative framework
replace, go.work, summer.yaml, config/ and a starter plugin
- make:plugin gains an opt-in starter route (GET /{$}) in the same
routes.go template; plain make:plugin output is unchanged
- plugin:add writes go.work use paths relative to the go.work directory
- bonfire accepts new as a bare tool command name
36 lines
1001 B
Cheetah
36 lines
1001 B
Cheetah
{{define "new/go.mod"}}module {{.Module}}
|
|
|
|
{{.GoVersion}}
|
|
|
|
{{.Toolchain}}
|
|
|
|
require {{.Framework}} v0.0.0
|
|
|
|
replace {{.Framework}} => {{.Replace}}
|
|
{{end}}
|
|
|
|
{{define "new/config/app.yaml"}}name: {{.Name}}
|
|
debug: false
|
|
# The application key encrypts data at rest. Set SUMMER_APP__KEY in .env (a
|
|
# 32-byte base64 value); keep it out of this file and out of git.
|
|
key: ""
|
|
{{end}}
|
|
|
|
{{define "new/config/database.yaml"}}# Set SUMMER_DATABASE__DSN in .env; compose.yaml runs the matching PostgreSQL.
|
|
dsn: ""
|
|
{{end}}
|
|
|
|
{{define "new/config/http.yaml"}}body_limits:
|
|
# Request body limits in bytes. Keep them YAML numbers: values from the
|
|
# environment are strings and are rejected at boot.
|
|
default_bytes: 1048576
|
|
upload_bytes: 10485760
|
|
{{end}}
|
|
|
|
{{define "new/config/storage.yaml"}}# Uploads bucket, required by summer serve. A file:// URL is a local
|
|
# directory under the application working directory.
|
|
uploads:
|
|
bucket_url: "file://./storage/app/uploads"
|
|
public_path_prefix: "/storage/uploads"
|
|
{{end}}
|