Add -api flag to monolith (#1044)

* Add flag for enabling HTTP APIs in monolith mode

* Flag -api

* Only start HTTP APIs if needed
This commit is contained in:
Neil Alexander 2020-05-18 10:56:43 +01:00 committed by GitHub
parent bfb954519b
commit dce4f436f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 35 additions and 22 deletions

View file

@ -82,7 +82,9 @@ func SetupAppServiceAPIComponent(
Cfg: base.Cfg,
}
appserviceQueryAPI.SetupHTTP(http.DefaultServeMux)
if base.EnableHTTPAPIs {
appserviceQueryAPI.SetupHTTP(http.DefaultServeMux)
}
consumer := consumers.NewOutputRoomEventConsumer(
base.Cfg, base.KafkaConsumer, accountsDB, appserviceDB,