Reorganize project structure and fix SQLite usage

This commit is contained in:
bronku 2025-03-23 10:45:42 +01:00
parent 0e762841a3
commit e2dda0ade7
20 changed files with 76 additions and 46 deletions

23
cmd/iroon/main.go Normal file
View file

@ -0,0 +1,23 @@
package iroon
import (
"log"
"net/http"
"github.com/Bronku/iroon/internal/auth"
"github.com/Bronku/iroon/internal/logging"
"github.com/Bronku/iroon/internal/server"
)
func Run() {
h, err := server.New()
if err != nil {
log.Fatal(err)
}
defer h.Close()
var handler http.Handler = h
handler = logging.Middleware(handler)
handler = auth.New().Middleware(handler)
log.Fatal(http.ListenAndServe(":8080", handler))
}