refactor: build static go binary
This commit is contained in:
parent
60039fc562
commit
5ba57ae81b
@ -4,10 +4,11 @@ info:
|
||||
|
||||
build:
|
||||
$(MAKE) generate
|
||||
go build -o knowyt src/knowyt.go
|
||||
cd src/ && CGO_ENABLED=0 go build -o ../knowyt knowyt.go
|
||||
|
||||
run:
|
||||
go run src/knowyt.go
|
||||
$(MAKE) build
|
||||
./knowyt
|
||||
|
||||
run-loop:
|
||||
pexec -R -c -e TARGET \
|
||||
|
@ -6,6 +6,6 @@ type ApplicationConfig struct {
|
||||
|
||||
func NewApplicationConfig() ApplicationConfig {
|
||||
return ApplicationConfig{
|
||||
DataDir: "../data/",
|
||||
DataDir: "data/",
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"sirlab.de/go/knowyt/application"
|
||||
"sirlab.de/go/knowyt/applicationConfig"
|
||||
@ -38,7 +37,7 @@ func main() {
|
||||
mux.PrivateHandleFunc("/api/removeQuote", app.RemoveQuote)
|
||||
|
||||
// default handler
|
||||
http.HandleFunc("/", handler.FileHandler)
|
||||
mux.PublicHandleFunc("/", handler.FileHandler)
|
||||
|
||||
// start listening
|
||||
fmt.Printf("http://localhost:%d/\n", mux.Port)
|
||||
|
Loading…
Reference in New Issue
Block a user