Main.java 1012 B

123456789101112131415161718192021222324252627282930313233
  1. package at.acdp.urweb;
  2. import at.acdp.urweb.fhpp.FHMaster;
  3. import at.acdp.urweb.fhpp.FHPP;
  4. import at.acdp.urweb.web.XRServer;
  5. import com.nmote.nanohttp.NanoServer;
  6. import com.nmote.xr.XR;
  7. import org.slf4j.LoggerFactory;
  8. public class Main {
  9. private final static org.slf4j.Logger logger = LoggerFactory.getLogger(Main.class);
  10. public static void main(String[] args) {
  11. Params app = null;
  12. try {
  13. app = picocli.CommandLine.populateCommand(new Params(), args);
  14. var a=new FHMaster();
  15. a.start();
  16. } catch (Exception e) {
  17. logger.error("failed.", e);
  18. picocli.CommandLine.usage(new Params(), System.out);
  19. System.exit(1);
  20. }
  21. try {
  22. //new WebServer(app).start();
  23. NanoServer server = new NanoServer(app.port);
  24. server.add(XR.server(XRServer.class));
  25. server.start();
  26. } catch (Exception e) {
  27. logger.error("Server exited", e);
  28. }
  29. }
  30. }