diff --git a/Makefile b/Makefile index cc2540c..1c92e2a 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,16 @@ lint: golint cmd/... golint passgen/... -run: +dev: air +run: + go main.go + +run-web: + go main.go --web=t + web: cd client && npm run start -.PHONY: lint run \ No newline at end of file +.PHONY: lint run dev run-web \ No newline at end of file diff --git a/main.go b/main.go index b2a6289..4864019 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "flag" "log" "net/http" @@ -9,8 +10,14 @@ import ( ) func main() { - serveWeb() - //cli() + web := flag.Bool("web", false, "") + flag.Parse() + + if *web { + serveWeb() + return + } + cli() } func cli() {