Reorganize project structure and fix SQLite usage
This commit is contained in:
parent
0e762841a3
commit
e2dda0ade7
20 changed files with 76 additions and 46 deletions
23
cmd/iroon/main.go
Normal file
23
cmd/iroon/main.go
Normal 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))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue