Danielle / server /index.go
johndeniel's picture
Upload 10 files
2c19d0c verified
raw
history blame
311 Bytes
package server
import (
"html/template"
"net/http"
"path/filepath"
"github.com/johndeniel/danielle/models"
)
func HomeHandler(w http.ResponseWriter, r *http.Request) {
tmpl := template.Must(template.ParseFiles(filepath.Join("templates", "index.html")))
tmpl.Execute(w, models.Perfumes)
}