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

20
main.go
View file

@ -1,23 +1,7 @@
package main
import (
"log"
"net/http"
"github.com/Bronku/iroon/auth"
"github.com/Bronku/iroon/logging"
"github.com/Bronku/iroon/server"
)
import "github.com/Bronku/iroon/cmd/iroon"
func main() {
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))
iroon.Run()
}