go-web/main.go

25 lines
580 B
Go
Raw Permalink Normal View History

2024-09-05 14:23:58 +00:00
package main
import (
"git.vinchent.xyz/vinchent/go-web/app/console"
"git.vinchent.xyz/vinchent/go-web/app/web"
"git.vinchent.xyz/vinchent/go-web/framework"
"git.vinchent.xyz/vinchent/go-web/framework/providers/app"
"git.vinchent.xyz/vinchent/go-web/framework/providers/kernel"
2024-09-05 14:23:58 +00:00
)
func main() {
container := framework.NewGoWebContainer()
2024-09-26 20:27:26 +00:00
container.Bind(&app.GoWebAppProvider{})
2024-09-26 20:27:26 +00:00
engine, err := web.NewHttpEngine()
if err != nil {
panic("Cannot start http server")
}
2024-09-26 20:27:26 +00:00
container.Bind(&kernel.GoWebKernelProvider{HttpEngine: engine})
2024-09-26 20:58:55 +00:00
console.RunCommand(container)
2024-09-05 14:23:58 +00:00
}