Main.java 975 B

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