feat(mail): #132 unify env variables and send mails with smtp
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 46s

This commit is contained in:
Tim
2024-09-06 16:17:49 +02:00
parent 2c23a508ec
commit 6669e4adab
7 changed files with 105 additions and 22 deletions

View File

@@ -3,6 +3,7 @@ package main
import (
"me-fit/middleware"
"me-fit/service"
"me-fit/utils"
"database/sql"
"net/http"
@@ -13,6 +14,10 @@ func getHandler(db *sql.DB) http.Handler {
router.HandleFunc("/", service.HandleIndexAnd404(db))
router.HandleFunc("/mail", func(w http.ResponseWriter, r *http.Request) {
utils.SendWelcomeMail("timwundenberg@outlook.de")
})
// Serve static files (CSS, JS and images)
router.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("./static/"))))