diff --git a/cmd/build/main.go b/cmd/build/main.go index e8d73aa..5f30256 100644 --- a/cmd/build/main.go +++ b/cmd/build/main.go @@ -13,6 +13,8 @@ func main() { dir := flag.String("d", "./dist", "the directory to write the files") staticDir := flag.String("s", "./static", "the directory to copy static files from") + flag.Parse() + w := internals.StaticWriter{ DistDir: dir, StaticDir: staticDir, diff --git a/cmd/vercel/main.go b/cmd/vercel/main.go index e321e6e..06ea52e 100644 --- a/cmd/vercel/main.go +++ b/cmd/vercel/main.go @@ -24,6 +24,8 @@ func main() { staticDir := flag.String("s", "./static", "the directory to copy static files from") port := flag.Int("p", 8080, "the port to run the server") + flag.Parse() + configFile, err := os.ReadFile(*configPath) if err != nil { logger.Fatalf("Unable to read vercel.json file due to:\n%s", err) diff --git a/main.go b/main.go index 1d3228a..14e690f 100644 --- a/main.go +++ b/main.go @@ -18,6 +18,8 @@ func main() { staticDir := flag.String("s", "./static", "the directory to copy static files from") port := flag.Int("p", 8080, "the port to run the server") + flag.Parse() + mux := http.NewServeMux() config.APIROUTES(mux)