Skip to content

Standalone apps

app, err := dygo.CreateApplicationContext(ctx, AppModule)
if err != nil {
fmt.Fprintln(os.Stderr, err) // lists every wiring problem at once
os.Exit(1)
}
svc := dygo.MustGet[*users.UserService](app)
_ = app.Run(ctx) // waits for Ctrl+C / SIGTERM, then runs shutdown hooks