diff --git a/gin.go b/gin.go index a06c13a5..1c4b019f 100644 --- a/gin.go +++ b/gin.go @@ -171,6 +171,12 @@ func (engine *Engine) Run(addr string) { } } +func (engine *Engine) RunTLS(addr string, cert string, key string) { + if err := http.ListenAndServeTLS(addr, cert, key, engine); err != nil { + panic(err) + } +} + /************************************/ /********** ROUTES GROUPING *********/ /************************************/