MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / main

Function main

api/main.go:32–46  ·  view source on GitHub ↗

@title httpSMS API Reference @version 1.0 @description Use your Android phone to send and receive SMS messages via a simple programmable API with end-to-end encryption. @contact.name support@httpsms.com @contact.email support@httpsms.com @license.name AGPL-3.0 @license.url https://raw.

()

Source from the content-addressed store, hash-verified

30// @in header
31// @name x-api-Key
32func main() {
33 if len(os.Args) == 1 {
34 di.LoadEnv()
35 }
36
37 if host := strings.TrimSpace(os.Getenv("SWAGGER_HOST")); len(host) > 0 {
38 docs.SwaggerInfo.Host = host
39 }
40 if len(Version) > 0 {
41 docs.SwaggerInfo.Version = Version
42 }
43
44 container := di.NewContainer(os.Getenv("GCP_PROJECT_ID"), Version)
45 container.Logger().Info(container.App().Listen(fmt.Sprintf("%s:%s", os.Getenv("APP_HOST"), os.Getenv("APP_PORT"))).Error())
46}

Callers

nothing calls this directly

Calls 4

LoggerMethod · 0.95
AppMethod · 0.95
InfoMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected