@@ -0,0 +1,1692 @@
+package io.miti.shortstop.server;%0A%0Aimport io.miti.shortstop.util.Utility;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.IOException;%0Aimport java.util.Properties;%0A%0Apublic final class Config%0A%7B%0A  private static final int DEFAULT_PORT = 8000;%0A  %0A  private static final String PROPS_FILENAME = %22shortstop.props%22;%0A  %0A  private int port = DEFAULT_PORT;%0A  %0A  public Config() %7B%0A    readProperties();%0A  %7D%0A  %0A  public int getPort() %7B%0A    return port;%0A  %7D%0A  %0A  private void readProperties() %7B%0A    %0A    // Create a reference to the properties file and verify it exists%0A    File file = new File(PROPS_FILENAME);%0A    if (!file.exists() %7C%7C file.isDirectory()) %7B%0A      return;%0A    %7D%0A    %0A    FileInputStream fileInput = null;%0A    try %7B%0A      fileInput = new FileInputStream(file);%0A      Properties props = new Properties();%0A      props.load(fileInput);%0A      loadProperties(props);%0A      fileInput.close();%0A      fileInput = null;%0A    %7D catch (FileNotFoundException e) %7B%0A      e.printStackTrace();%0A    %7D catch (IOException e) %7B%0A      e.printStackTrace();%0A    %7D finally %7B%0A      if (fileInput != null) %7B%0A        try %7B%0A          fileInput.close();%0A          fileInput = null;%0A        %7D catch (IOException e) %7B%0A          e.printStackTrace();%0A        %7D%0A      %7D%0A    %7D%0A  %7D%0A  %0A  /**%0A   * Load data into the member variables.%0A   * %0A   * @param props the contents of the properties file%0A   */%0A  private void loadProperties(Properties props) %7B%0A    // Get the port the server should run on%0A    final String sPort = props.getProperty(%22http.port%22);%0A    port = Utility.parseStringAsInt(sPort, DEFAULT_PORT);%0A    port = Math.max(20, Math.min(20_000, port));%0A  %7D%0A%7D%0A

Support getting config properties from a file.