@@ -21,6 +21,6 @@ jobs:
|
||||
chmod +x ~/apps/hub/hub-api
|
||||
cp config.yaml ~/apps/hub/config.yaml
|
||||
cp -r scripts/. ~/apps/hub/scripts/
|
||||
cp -r web/dist/. ~/apps/hub/dist/
|
||||
cp -r dist/. ~/apps/hub/dist/
|
||||
chmod +x ~/apps/hub/hub-api ~/apps/hub/scripts/*
|
||||
systemctl --user restart hub-api
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
bin/
|
||||
dist/
|
||||
node_modules/
|
||||
web/dist/
|
||||
.DS_Store
|
||||
|
||||
@@ -9,8 +9,8 @@ proto: ## Regenerate Go + TS code from proto
|
||||
--es_out=web/src/gen --es_opt=target=ts \
|
||||
proto/homelab/v1/homelab.proto
|
||||
|
||||
web: ## Build frontend into web/dist (tsc + vite)
|
||||
cd web && pnpm install --frozen-lockfile && pnpm build
|
||||
web: ## Build frontend into dist/ (tsc + vite) — same dir the binary serves
|
||||
cd web && pnpm install --frozen-lockfile && pnpm build && rm -rf ../dist && cp -r dist ../dist
|
||||
|
||||
server: ## Build Go binary → bin/hub-api
|
||||
go build -o bin/hub-api ./server
|
||||
|
||||
+1
-1
@@ -214,7 +214,7 @@ func main() {
|
||||
}
|
||||
})
|
||||
|
||||
// Static PWA from dist/ next to the binary (CI copies web/dist → dist); HTML5 mode falls back to index.html for SPA routes.
|
||||
// Static PWA from dist/ (built by make web); HTML5 mode falls back to index.html for SPA routes.
|
||||
e.Use(middleware.StaticWithConfig(middleware.StaticConfig{
|
||||
Root: "dist",
|
||||
HTML5: true,
|
||||
|
||||
Reference in New Issue
Block a user