Add configuration for HTTP and debug mode

This commit is contained in:
eikendev 2020-07-31 20:04:33 +02:00
parent ba0306f384
commit 354ce0c08d
No known key found for this signature in database
GPG key ID: A1BDB1B28C8EF694
4 changed files with 22 additions and 5 deletions

View file

@ -1,10 +1,12 @@
package runner
import (
"fmt"
"github.com/gin-gonic/gin"
)
// Run starts the Gin engine.
func Run(engine *gin.Engine) {
engine.Run(":8080")
func Run(engine *gin.Engine, address string, port int) {
engine.Run(fmt.Sprintf("%s:%d", address, port))
}