Class LocalServerKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static <T extends ComponentsProvider> Unit runLocalServer(Api<T> api, T components, Integer port, String contextRoot, String staticFilesDir, RequestContextFactory requestContextFactory) Runs a very basic Jetty server running on the specified port that serves OsirisServlet from the root.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • runLocalServer

         final static <T extends ComponentsProvider> Unit runLocalServer(Api<T> api, T components, Integer port, String contextRoot, String staticFilesDir, RequestContextFactory requestContextFactory)

        Runs a very basic Jetty server running on the specified port that serves OsirisServlet from the root.

        This is a convenience method for running a local server from a main method. The implementation runs and joins the server, so the method never returns and the server can only be stopped by killing the process.

        The contextRoot argument controls the URL on which the API is available. By default, the API is available at:

        http://localhost:8080/

        If contextRoot is /foo then the API would be available at:

        http://localhost:8080/foo/