diff --git a/main b/main index 7e3bbc3..8bfa27f 100755 Binary files a/main and b/main differ diff --git a/main.go b/main.go index f597cdd..a741804 100644 --- a/main.go +++ b/main.go @@ -2,6 +2,7 @@ package main import ( "database/sql" + "flag" "github.com/gin-gonic/gin" _ "github.com/mattn/go-sqlite3" "net/http" @@ -246,6 +247,9 @@ func getUserPoints(c *gin.Context) { } func main() { + var port string + flag.StringVar(&port, "port", "localhost:8080", "define the port you want the program to use to serve") + flag.Parse() //release mode //gin.SetMode(gin.ReleaseMode) router := gin.Default() @@ -265,7 +269,7 @@ func main() { }) router.Static("/frontend", "./frontend") - router.Run("localhost:8080") + router.Run(port) } func checkErr(err error) {