public Application build() { if (application == null) { container.addInstance(BasePath.class, basePath("/")); application = container.get(Application.class); } return application; }
public Server start(ServerConfiguration configuration) { container.addInstance(ServerConfiguration.class, configuration); container.addInstance(BasePath.class, configuration.basePath()); container.addActivator(Server.class, ServerActivator.class); return container.get(Server.class); }