summaryrefslogtreecommitdiffstats
path: root/cmd/platform/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/platform/server.go')
-rw-r--r--cmd/platform/server.go17
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()