27 lines
410 B
Go
27 lines
410 B
Go
package main
|
|
|
|
import (
|
|
"iris-test/app/cfg"
|
|
"iris-test/app/db"
|
|
"iris-test/app/logging"
|
|
"iris-test/app/views"
|
|
|
|
"github.com/kataras/iris/v12"
|
|
)
|
|
|
|
func createApp() *iris.Application {
|
|
app := iris.New()
|
|
app.RegisterView(iris.Jet("./app/templates", ".jet").Reload(true))
|
|
views.CreateRouter(app)
|
|
return app
|
|
}
|
|
|
|
func main() {
|
|
cfg.Init()
|
|
logging.Init()
|
|
db.InitDB()
|
|
|
|
app := createApp()
|
|
app.Listen(":8000")
|
|
}
|