serve the embedded frontend alongside the API, slice 1 of M4
//go:embed needs internal/webdist/dist to exist at compile time, so a one-line placeholder index.html is committed there and the real build (Docker, or a manual copy of web/dist) overwrites it. One mux serves /, /api, and a /healthz for the compose healthcheck to come.
This commit is contained in:
parent
bbba450c6e
commit
3684488d75
4 changed files with 58 additions and 5 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -3,3 +3,8 @@
|
|||
|
||||
# prettier cache (npm run format in web/ walks up here)
|
||||
/node_modules/
|
||||
|
||||
# real frontend builds copied over the committed placeholder (index.html
|
||||
# stays tracked; `git restore internal/webdist/dist` after local testing)
|
||||
/internal/webdist/dist/*
|
||||
!/internal/webdist/dist/index.html
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue