diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-05-18 10:56:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 10:56:43 +0100 |
commit | dce4f436f77b71155483a47a6ad14da5c0ae5d6a (patch) | |
tree | 8a6202e52790878bdcd5e7f12205d2d179f86ac5 /eduserver/eduserver.go | |
parent | bfb954519bdf172451d999ac4c654b3d15eff124 (diff) |
Add -api flag to monolith (#1044)
* Add flag for enabling HTTP APIs in monolith mode
* Flag -api
* Only start HTTP APIs if needed
Diffstat (limited to 'eduserver/eduserver.go')
-rw-r--r-- | eduserver/eduserver.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/eduserver/eduserver.go b/eduserver/eduserver.go index 8ddd2c52..2a209364 100644 --- a/eduserver/eduserver.go +++ b/eduserver/eduserver.go @@ -35,6 +35,9 @@ func SetupEDUServerComponent( OutputTypingEventTopic: string(base.Cfg.Kafka.Topics.OutputTypingEvent), } - inputAPI.SetupHTTP(http.DefaultServeMux) + if base.EnableHTTPAPIs { + inputAPI.SetupHTTP(http.DefaultServeMux) + } + return inputAPI } |