Merge pull request #12 from pintman/master

port can be specified on the commandline.
This commit is contained in:
Marcel Hellkamp 2018-05-24 16:20:44 +02:00 committed by GitHub
commit 1c26156476
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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();
} }
} }