mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 06:08:16 +00:00
display ip
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"wallet-api/pkg/utl/common"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@@ -16,6 +19,10 @@ func Start(r *gin.Engine) *gin.Engine {
|
||||
if port == "" {
|
||||
port = "4000"
|
||||
}
|
||||
r.Run(":" + port)
|
||||
err := r.Run(":" + port)
|
||||
if err != nil {
|
||||
msg := fmt.Sprintf("Running on %s:%s", common.GetIP(), port)
|
||||
println(msg)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user