diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-09-15 08:51:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-15 08:51:46 -0400 |
commit | 2628022275ef64fde95545abe4634b4bd7177844 (patch) | |
tree | 25d451b81d720f44aa09b20389be7fbb75b7864e /cmd/platform/server.go | |
parent | 2a6cd44f23e1b3207debaa73801f0c63a2c81126 (diff) | |
download | chat-2628022275ef64fde95545abe4634b4bd7177844.tar.gz chat-2628022275ef64fde95545abe4634b4bd7177844.tar.bz2 chat-2628022275ef64fde95545abe4634b4bd7177844.zip |
PLT-7622 Improvements to server handling of webapp plugins (#7445)
* Improvements to server handling of webapp plugins
* Fix newline
* Update manifest function names
Diffstat (limited to 'cmd/platform/server.go')
-rw-r--r-- | cmd/platform/server.go | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/cmd/platform/server.go b/cmd/platform/server.go index 15c80134c..a8e724f58 100644 --- a/cmd/platform/server.go +++ b/cmd/platform/server.go @@ -62,11 +62,6 @@ func runServer(configFileLocation string) { l4g.Info(utils.T("mattermost.working_dir"), pwd) l4g.Info(utils.T("mattermost.config_file"), utils.FindConfigFile(configFileLocation)) - // Enable developer settings if this is a "dev" build - if model.BuildNumber == "dev" { - *utils.Cfg.ServiceSettings.EnableDeveloper = true - } - if err := utils.TestFileConnection(); err != nil { l4g.Error("Problem with file storage settings: " + err.Error()) } @@ -79,7 +74,12 @@ func runServer(configFileLocation string) { if model.BuildEnterpriseReady == "true" { a.LoadLicense() } - a.InitPlugins("plugins", "webapp/dist") + + if webappDir, ok := utils.FindDir(model.CLIENT_DIR); ok { + a.InitPlugins("plugins", webappDir+"/plugins") + } else { + l4g.Error("Unable to find webapp directory, could not initialize plugins") + } wsapi.InitRouter() api4.InitApi(a.Srv.Router, false) @@ -98,6 +98,11 @@ func runServer(configFileLocation string) { app.ReloadConfig() + // Enable developer settings if this is a "dev" build + if model.BuildNumber == "dev" { + *utils.Cfg.ServiceSettings.EnableDeveloper = true + } + resetStatuses(a) a.StartServer() |