diff --git a/snippetbox/.gitignore b/snippetbox/.gitignore new file mode 100644 index 0000000..8393d02 --- /dev/null +++ b/snippetbox/.gitignore @@ -0,0 +1 @@ +tls/ diff --git a/snippetbox/cmd/web/main.go b/snippetbox/cmd/web/main.go index 4d87c1d..5aab8c3 100644 --- a/snippetbox/cmd/web/main.go +++ b/snippetbox/cmd/web/main.go @@ -75,7 +75,7 @@ func main() { logger.Info("starting server", slog.String("addr", srv.Addr)) - err = srv.ListenAndServe() + err = srv.ListenAndServeTLS("./tls/cert.pem", "./tls/key.pem") logger.Error(err.Error()) os.Exit(1)