Refactor folder structure

This commit is contained in:
Joakim Hellsén 2024-02-13 21:21:08 +01:00
commit c7cca02ca7
30 changed files with 610 additions and 933 deletions

20
pkg/handlers/api.go Normal file
View file

@ -0,0 +1,20 @@
package handlers
import (
"net/http"
"github.com/TheLovinator1/FeedVault/pkg/html"
)
func ApiHandler(w http.ResponseWriter, _ *http.Request) {
htmlData := html.HTMLData{
Title: "FeedVault API",
Description: "FeedVault API - A feed archive",
Keywords: "RSS, Atom, Feed, Archive, API",
Author: "TheLovinator",
CanonicalURL: "http://localhost:8000/api",
Content: "<p>Here be dragons.</p>",
}
html := html.FullHTML(htmlData)
w.Write([]byte(html))
}