diff --git a/src/main/java/tech/nevets/rickrollprot/Server.java b/src/main/java/tech/nevets/rickrollprot/Server.java index 3f5e440..2192858 100644 --- a/src/main/java/tech/nevets/rickrollprot/Server.java +++ b/src/main/java/tech/nevets/rickrollprot/Server.java @@ -4,7 +4,11 @@ import static spark.Spark.*; public class Server { public static void main(String[] args) { - port(8080); + if (args.length >= 1) { + port(Integer.parseInt(args[0])); + } else { + port(8080); + } get("/rickrollprot/check/:link", new CheckRoute()); }