Skip to content

Commit

Permalink
add app.TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
acoshift committed Jul 30, 2018
1 parent 003ec77 commit e75e7bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ func (app *App) ListenAndServe() error {
return app.listenAndServe()
}

// TLS sets cert and key file
func (app *App) TLS(certFile, keyFile string) *App {
app.certFile, app.keyFile = certFile, keyFile
return app
}

// ListenAndServeTLS starts web server in tls mode
func (app *App) ListenAndServeTLS(certFile, keyFile string) error {
if app.gracefulShutdown != nil {
Expand Down

0 comments on commit e75e7bd

Please sign in to comment.