Skip to content

Commit

Permalink
Release 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
YanWittmann committed May 25, 2022
1 parent 07bf2e2 commit b32a318
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>de.yanwittmann</groupId>
<artifactId>presentation-live-feedback</artifactId>
<version>HEAD-SNAPSHOT</version>
<version>1.2.0</version>

<properties>
<maven.compiler.source>11</maven.compiler.source>
Expand Down
11 changes: 8 additions & 3 deletions src/main/java/de/yanwittmann/presentation/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit b32a318

Please sign in to comment.