go-sample-webpage/main.go
kekskurse 7b6204a0b3
All checks were successful
continuous-integration/drone/push Build is passing
Uer Config
2021-11-09 19:23:19 +01:00

29 lines
683 B
Go

package main
import (
"embed"
"git.keks.cloud/kekskurse/go-sample-webpage/pkg/sample"
"git.keks.cloud/kekskurse/go-sample-webpage/pkg/user"
"git.keks.cloud/kekskurse/go-sample-webpage/pkg/webpage"
)
// content holds our static web server content.
//go:embed static/* templates/*
var webserver embed.FS
//go:embed database/migrations/*.sql
var migrationFS embed.FS
func main() {
config := webpage.WebPageConfig{
Templates: webserver,
Static: webserver,
Migrations: migrationFS,
Bootstrap: func(config webpage.BootstrapConfig) {
sample.Register(config.Router)
user.Register(config.Router, config.Token, user.NewConfig())
},
}
webpage.RunWebApp(config)
}