Initial commit with cru (no delete) of notes

This commit is contained in:
Maximilian Friedersdorff 2025-01-26 22:23:42 +00:00
commit 1e1174f9ca
11 changed files with 244 additions and 0 deletions

19
cmd/server/main.go Normal file
View file

@ -0,0 +1,19 @@
package main
import (
"log"
"net/http"
"gitea.gwairfelin.com/max/gonotes/internal/conf"
"gitea.gwairfelin.com/max/gonotes/internal/notes/views"
)
func main() {
conf.LoadConfig("./conf.toml")
router := http.NewServeMux()
notesRouter := views.GetRoutes("/notes")
router.Handle("/notes/", http.StripPrefix("/notes", notesRouter))
log.Fatal(http.ListenAndServe(":8080", router))
}