diff --git a/apis/serve.go b/apis/serve.go index f423785e..223cc2e0 100644 --- a/apis/serve.go +++ b/apis/serve.go @@ -37,6 +37,16 @@ type ServeConfig struct { } // Serve starts a new app web server. +// +// NB! The app should be bootstrapped before starting the web server. +// +// Example: +// +// app.Bootstrap() +// apis.Serve(app, apis.ServeConfig{ +// HttpAddr: "127.0.0.1:8080", +// ShowStartBanner: false, +// }) func Serve(app core.App, config ServeConfig) (*http.Server, error) { if len(config.AllowedOrigins) == 0 { config.AllowedOrigins = []string{"*"}