Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

47
LINES

< > BotCompany Repo | #1022823 // Eleutheria Main for butter.botcompany.de as Dyn Module [dev.]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (14559L/89K).

!7

!include once #1002615 // master()

// Homepage, Talk to Eleu, Web Auth, Cookies
static L<S> seedBots = litlist("#1003253", "#1002213", "#1002590", "#1002157");

!include #1002576 // Web Serving
!include #1002578 // Eleu Core
!include #1013904 // Eleu web socket

static int[] webServerPorts = {80, 8080};
static int[] httpsPorts = {443, 8443};

cmodule Eleu > DynPrintLog {
  start {
    becomeBotVMIfFirst();
    webInit();
    
    eleu_webSocket_init();
    
    if (nempty(httpsPorts)) pcall {
      File keystore = firstFileThatExists(
        javaxSecretDir("keystore.p12"),
        secretProgramFile(#1002017, "keystore.jks"));
      S pass = loadSecretTextFileMandatory(#1002017, "keystore-pass").trim();
      //serveHttps(httpsPort, keystore, pass);
      //serveHttpsWithWebsockets(httpsPort, keystore, pass, eleu_webSocket_handler());
      //serveHttpsWithWebsockets_server.printServes = false;
      serveHttpsWithWebsockets_multiplePorts(keystore, pass, eleu_webSocket_handler(), httpsPorts);
    }
    
    coreInit();
    
    for (S id : seedBots)
      call(getDispatcher(), "addSeedBot", id);
      
    // TODO
    /*if (hasBot("New Eleu Watch Dog."))
      print("Have Eleu Watch Dog.");
    else {
      print("Starting Eleu Watch Dog.");
      nohupJavax(#1014075);
      sleepSeconds(5);
    }*/
  }
}

Author comment

Began life as a copy of #1013896

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1022823
Snippet name: Eleutheria Main for butter.botcompany.de as Dyn Module [dev.]
Eternal ID of this version: #1022823/4
Text MD5: 5fe1a2940b2bd2edeac50902a3786f6f
Transpilation MD5: 68c391924006f491dff64918872b59b0
Author: stefan
Category: javax
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-09 11:52:09
Source code size: 1377 bytes / 47 lines
Pitched / IR pitched: No / No
Views / Downloads: 206 / 328
Version history: 3 change(s)
Referenced in: [show references]