now has an ORM and saves data (kinda)

This commit is contained in:
2019-10-27 05:38:03 -07:00
parent 9e9f49f139
commit e0102004eb
4 changed files with 147 additions and 18 deletions

View File

@@ -14,16 +14,28 @@ GOLDFLAGS += -X main.Buildtime=$(BUILDTIME)
GOLDFLAGS += -X main.Builduser=$(BUILDUSER)@$(BUILDHOST)
GOLDFLAGS += -X main.Buildarch=$(BUILDARCH)
GOLDFLAGS += -X main.Appname=$(APPNAME)
GOFLAGS = -ldflags "-linkmode external -extldflags -static $(GOLDFLAGS)"
UNAME_S := $(shell uname -s)
# osx can't statically link apparently?!
ifeq ($(UNAME_S),Darwin)
GOFLAGS := -ldflags "$(GOLDFLAGS)"
endif
ifneq ($(UNAME_S),Darwin)
GOFLAGS := -ldflags "-static -linkmode external -extldflags $(GOLDFLAGS)"
endif
default: run
run: build
DEBUG=1 ./$(APPNAME)
DEBUG=1 PORT=1111 ./$(APPNAME)
build: ./$(APPNAME)
./$(APPNAME): *.go
./$(APPNAME): *.go models/*.go
go build -o $@ $(GOFLAGS) .
clean: