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
4
internal/webdist/dist/index.html
vendored
Normal file
4
internal/webdist/dist/index.html
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8" />
|
||||
<title>spreadlab</title>
|
||||
<p>Placeholder page: this binary was built without the frontend. Run <code>npm run build</code> in <code>web/</code> and copy <code>web/dist</code> over <code>internal/webdist/dist</code>, or use the Docker image.</p>
|
||||
Loading…
Add table
Add a link
Reference in a new issue