port can be specified on the commandline.

This commit is contained in:
Marco Bakera 2018-05-24 16:13:46 +02:00
parent d698dca2ab
commit fbe90e14e3

View file

@ -82,7 +82,11 @@ public class PixelServer extends ChannelHandlerAdapter {
public static void main(final String[] args) throws InterruptedException, public static void main(final String[] args) throws InterruptedException,
IOException { IOException {
new PixelServer(8080).run(); int port = 8080;
if(args.length == 1) {
port = Integer.parseInt(args[0]);
}
System.out.println("Starting server on port " + port);
new PixelServer(port).run();
} }
} }