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

35
LINES

< > BotCompany Repo | #1031304 // gazelle.rocks [LIVE]

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

Uses 66614K of libraries. Click here for Pure Java version (7971L/64K).

1  
!7
2  
3  
!include once #1032300 // Playwright Include with sticky lib
4  
5  
static MapSO _renameClasses = litmap("GazelleBEA" := "GazelleBEAMainServer");
6  
  
7  
mainPackage gazelle
8  
mainClassName main
9  
10  
module GazelleBEAMainServer > GazelleBEA {
11  
  void init :: after {
12  
    runRefChecker = false;
13  
    set exportUsersInVM;
14  
    set exportUsersGlobally;
15  
  }
16  
  
17  
  @Override O serveDefaultPage(DynGazelleRocks.Req req) {
18  
    if (ewicOneOf(req.uri(), ".css", ".js"))
19  
      ret serve404Page();
20  
    S uri = req.uri();
21  
    if (startsWith(addSlash(uri), "/kb/"))
22  
      ret "Knowledge base missing :(";
23  
    //S uri = replacePrefix("/kb/", "/", uri);
24  
    ret hrefresh(addParamsToURL("https://gazelle.rocks/kb" + uri, req.params());
25  
  }
26  
  
27  
  O serve404Page() {
28  
    if (startsWith(currentReq().uri, "/crud/"))
29  
      ret hredirect(baseLink + "/login");
30  
    else
31  
      ret subBot_serve404("Resource not found, please try the " + ahref("/", "home page"));
32  
  }
33  
}
34  
35  
!include early #1031418 // Gazelle BEA

Author comment

Began life as a copy of #1030602

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031304
Snippet name: gazelle.rocks [LIVE]
Eternal ID of this version: #1031304/143
Text MD5: 0071bbd08bf03c8643bcff01f9076d49
Transpilation MD5: 1876b754a17ebee13f037717b727089a
Author: stefan
Category: javax
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-11-16 16:33:38
Source code size: 1001 bytes / 35 lines
Pitched / IR pitched: No / No
Views / Downloads: 1297 / 145046
Version history: 142 change(s)
Referenced in: [show references]