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
20
main.go
20
main.go
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue