diff --git a/README.md b/README.md
index f0de947..e7202d4 100644
--- a/README.md
+++ b/README.md
@@ -20,13 +20,16 @@ and run it using at least Java 11.
Command line arguments:
-- `ws` `webSocketPort`: port to use for the web socket server. Default is 8081.
-- `hs` `httpPort`: port to use for the http server. Default is 8080.
-- `pw` `password`: password to use for the admin. Default is a random alphanumeric string. In the running command line
- process, type `password` to print the admin password.
-- `ctx` `context` `path`: path of the http server. Default is `/`.
+- `ws` `webSocketPort`: port to use for the web socket server. Default is 8081
+- `hs` `httpPort`: port to use for the http server. Default is 8080
+- `pw` `password`: password to use for the admin. Default is a random alphanumeric string
+- `ctx` `context` `path`: path of the http server. Default is `/`
-Use `exit` to exit the application.
+In the running application process:
+
+- use `password` to print the admin password
+- use `open` to open the application using localhost in the browser
+- use `exit` to exit the application
Access the web interface at http://localhost:8080/ or your specified port/path respectively.
If you want to be able to access the web interface from another machine, simply open both ports in your firewall and use
diff --git a/pom.xml b/pom.xml
index b555a6c..e1e9c9d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
de.yanwittmann
presentation-live-feedback
- HEAD-SNAPSHOT
+ 1.2.0
11
diff --git a/src/main/java/de/yanwittmann/presentation/Main.java b/src/main/java/de/yanwittmann/presentation/Main.java
index e9423c0..a00b184 100644
--- a/src/main/java/de/yanwittmann/presentation/Main.java
+++ b/src/main/java/de/yanwittmann/presentation/Main.java
@@ -3,8 +3,10 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.awt.Desktop;
import java.io.BufferedInputStream;
import java.io.IOException;
+import java.net.URL;
import java.util.Properties;
public class Main {
@@ -59,9 +61,6 @@ public static void main(String[] args) throws Exception {
}
manager.startupServer(httpServerContext);
- Thread.sleep(2000);
- LOG.info("Commands available: [exit, password, ports]");
-
// read user input
while (true) {
BufferedInputStream in = new BufferedInputStream(System.in);
@@ -86,6 +85,12 @@ public static void main(String[] args) throws Exception {
LOG.info("WebSocket port is [{}]", webSocketPort);
LOG.info("HTTP port is [{}]", httpServerPort);
break;
+ case "open":
+ case "access":
+ URL url = new URL("http://localhost:" + httpServerPort + httpServerContext);
+ LOG.info("Opening URL [{}]", url);
+ Desktop.getDesktop().browse(url.toURI());
+ break;
default:
LOG.info("Unknown command [{}]", input);
break;