We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3cd594 commit 4cb2246Copy full SHA for 4cb2246
src/main/scala/de/upb/cs/swt/delphi/webapi/Configuration.scala
@@ -0,0 +1,13 @@
1
+package de.upb.cs.swt.delphi.webapi
2
+
3
+import com.sksamuel.elastic4s.ElasticsearchClientUri
4
5
+/**
6
+ * @author Ben Hermann
7
+ */
8
+class Configuration(val bindHost: String = "0.0.0.0",
9
+ val bindPort: Int = 8080,
10
+ val elasticsearchClientUri: ElasticsearchClientUri = ElasticsearchClientUri(
11
+ sys.env.getOrElse("DELPHI_ELASTIC_URI", "elasticsearch://localhost:9200"))) {
12
13
+}
src/main/scala/de/upb/cs/swt/delphi/webapi/Server.scala
@@ -45,7 +45,8 @@ object Server extends HttpApp {
45
}
46
47
def main(args: Array[String]): Unit = {
48
- Server.startServer("0.0.0.0", 8080)
+ val configuration = new Configuration()
49
+ Server.startServer(configuration.bindHost, configuration.bindPort)
50
51
52
0 commit comments