migrado de js para go
This commit is contained in:
parent
663a8d5bf2
commit
6f78511946
7 changed files with 964 additions and 83 deletions
|
|
@ -13,6 +13,13 @@ RUN go mod download
|
|||
|
||||
COPY . .
|
||||
|
||||
# Build do WASM do widget (regras de negócio no cliente)
|
||||
# Importante: a compilação do WASM exige GOOS=js/GOARCH=wasm.
|
||||
RUN GOOS=js GOARCH=wasm go build -trimpath -ldflags="-s -w" -o web/static/e-li.nps.wasm ./cmd/widgetwasm
|
||||
|
||||
# Copia o runtime JS do Go para WASM (Go class, polyfills)
|
||||
RUN cp "$(go env GOROOT)/lib/wasm/wasm_exec.js" web/static/wasm_exec.js
|
||||
|
||||
# Build do binário
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
|
||||
go build -trimpath -ldflags="-s -w" -o /out/server ./cmd/server
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue