Make port configurable

This commit is contained in:
Steven Tracey 2024-08-07 15:09:12 -04:00
parent 552ef17520
commit 66c7f9c40c

View File

@ -9,7 +9,12 @@ import static spark.Spark.*;
public class Server { public class Server {
public static void main(String[] args) { public static void main(String[] args) {
port(8080); if (args[1] != null) {
port(Integer.parseInt(args[1]));
} else {
port(8080);
}
path("/badge", () -> { path("/badge", () -> {
before("/*"); before("/*");