All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.sitebricks.cloud.Main.mvel Maven / Gradle / Ivy

The newest version!
package @{projectPackage};

import com.google.common.base.Preconditions;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;

/**
 * @{projectName} @{projectVersion} Entry point (Jetty webserver).
 */
public class Main {
  private static final String PORT = System.getenv("PORT");

  public static void main(String...args) throws Exception {
    Preconditions.checkState(PORT != null, "Missing config value: PORT");

    int port = Integer.parseInt(PORT);
    Server jetty = new Server(port);
    jetty.setHandler(new WebAppContext("web", "/"));

    System.out.println("starting '@{projectName}' on port: " + port);
    jetty.start();
    jetty.join();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy