generate certs files only when not existent
This commit is contained in:
@@ -26,5 +26,8 @@ func (s *Server) ServeHttp(port uint) error {
|
||||
}
|
||||
|
||||
func (s *Server) ServeHttps(port uint, cert cert.Cert) error {
|
||||
if err := cert.GenerateSelfSignedCert(); err != nil {
|
||||
return err
|
||||
}
|
||||
return s.Routes.RunTLS(fmt.Sprintf(":%d", port), cert.CertFile, cert.KeyFile)
|
||||
}
|
||||
|
Reference in New Issue
Block a user