From 6657de796ca75ec6cd24b3c73590e2324f3aca96 Mon Sep 17 00:00:00 2001
From: Benjamin Bollen <ben@erisindustries.com>
Date: Tue, 14 Jun 2016 16:55:35 +0200
Subject: [PATCH] Start server processes

---
 cmd/serve.go | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/cmd/serve.go b/cmd/serve.go
index 9c4c293e..c0edf725 100644
--- a/cmd/serve.go
+++ b/cmd/serve.go
@@ -135,8 +135,17 @@ func Serve(cmd *cobra.Command, args []string) {
     log.Fatalf("Failed to load server configuration: %s.", err)
     os.Exit(1)
   }
-  _, err = newCore.NewGateway(serverConfig)
-
+  serverProcess, err := newCore.NewGateway(serverConfig)
+  if err != nil {
+    log.Fatalf("Failed to load servers: %s.", err)
+    os.Exit(1)
+  }
+  err = serverProcess.Start()
+  if err != nil {
+    log.Fatalf("Failed to start servers: %s.", err)
+    os.Exit(1)
+  }
+  <- serverProcess.StopEventChannel()
 }
 
 //------------------------------------------------------------------------------
-- 
GitLab