From 5f81675b175bcd4d40e8a57300613c075fce8358 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Fri, 28 Oct 2022 20:09:27 +0300 Subject: actually use port env --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 59ccfa5..9bae176 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "log" "os" @@ -23,5 +24,5 @@ func main() { database.ConnectDB() router.Use(static.Serve("/", static.LocalFile("./frontend/dist", true))) routes.InitRoutes(router) - router.Run(":4000") + router.Run(fmt.Sprintf(":%s", os.Getenv("PORT"))) } -- cgit v1.2.3