diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2022-10-28 20:09:27 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2022-10-28 20:09:27 +0300 |
| commit | 5f81675b175bcd4d40e8a57300613c075fce8358 (patch) | |
| tree | 8b705a128e3fd3eb83052eab5e4ab09354424dde | |
| parent | change .env.example (diff) | |
| download | lphub-5f81675b175bcd4d40e8a57300613c075fce8358.tar.gz lphub-5f81675b175bcd4d40e8a57300613c075fce8358.tar.bz2 lphub-5f81675b175bcd4d40e8a57300613c075fce8358.zip | |
actually use port env
Diffstat (limited to '')
| -rw-r--r-- | main.go | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -1,6 +1,7 @@ | |||
| 1 | package main | 1 | package main |
| 2 | 2 | ||
| 3 | import ( | 3 | import ( |
| 4 | "fmt" | ||
| 4 | "log" | 5 | "log" |
| 5 | "os" | 6 | "os" |
| 6 | 7 | ||
| @@ -23,5 +24,5 @@ func main() { | |||
| 23 | database.ConnectDB() | 24 | database.ConnectDB() |
| 24 | router.Use(static.Serve("/", static.LocalFile("./frontend/dist", true))) | 25 | router.Use(static.Serve("/", static.LocalFile("./frontend/dist", true))) |
| 25 | routes.InitRoutes(router) | 26 | routes.InitRoutes(router) |
| 26 | router.Run(":4000") | 27 | router.Run(fmt.Sprintf(":%s", os.Getenv("PORT"))) |
| 27 | } | 28 | } |