feat(controller): intial build functions setup in go and service building

This commit is contained in:
2025-09-05 09:14:34 -05:00
parent 8a07c8afe4
commit 87aafef350
13 changed files with 510 additions and 8 deletions

17
controller/build_app.go Normal file
View File

@@ -0,0 +1,17 @@
package main
import (
"os"
"os/exec"
)
// ---- Run npm build ----
func runNpmBuild() error {
cmd := exec.Command("npm", "run", "build")
if os.Getenv("RUNNING_IN_DOCKER") == "true" {
cmd.Dir = "/app"
}
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return cmd.Run()
}