modweb/examples/test/main.go

27 lines
501 B
Go
Raw Normal View History

2020-11-11 22:48:11 +00:00
package main
import (
"git.ddd.rip/ptrcnull/modweb"
helloworld "git.ddd.rip/ptrcnull/modweb/examples/test/hello-world"
2020-12-23 02:05:12 +00:00
auth "git.ddd.rip/ptrcnull/modweb/modules/auth/login_form"
2020-11-11 22:48:11 +00:00
)
func main() {
app := modweb.New(modweb.Config{
AppName: "Test App",
})
2020-12-23 02:05:12 +00:00
app.Register(&auth.Module{
Handler: func(user, pass string) *modweb.User {
return nil
},
})
// app.Register(&discord_login.Module{})
2020-11-16 20:19:37 +00:00
app.Register(&helloworld.Module{})
2020-11-11 22:48:11 +00:00
err := app.Run(":8011")
if err != nil {
panic(err)
}
}