raven/raven.go

32 lines
487 B
Go
Raw Normal View History

2022-12-07 20:20:38 -05:00
package main
import (
"github.com/flamego/flamego"
2022-12-07 21:24:11 -05:00
"github.com/flamego/template"
2022-12-07 22:07:33 -05:00
"git.metaunix.net/metaunix/raven/app/db"
2022-12-07 21:24:11 -05:00
"git.metaunix.net/metaunix/raven/app/web"
2022-12-07 20:20:38 -05:00
)
func main() {
2022-12-07 21:24:11 -05:00
f := flamego.New()
2022-12-07 22:07:33 -05:00
// Initialize the database connection
db.InitDatabase()
2022-12-07 21:24:11 -05:00
// Initialize template engine
f.Use(template.Templater(template.Options{
Directory: "views",
}))
f.Use(flamego.Static(
flamego.StaticOptions{
Directory: "public",
},
))
2022-12-07 22:07:33 -05:00
2022-12-07 21:24:11 -05:00
web.RegisterRoutes(f)
2022-12-07 20:20:38 -05:00
f.Run()
}