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

17
LINES

< > BotCompany Repo | #1027715 // Test HttpFromFileSystem

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

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

!7

cmodule TestHttpFromFileSystem > DynPrintLogAndEnabled {
  !include #1027628 // HTTP+HTTPS servers
  
  S baseDir = f2s(prepareProgramDir());

  start {
    saveProgramTextFile("hello.html", b("BOLD"));
    print("Base dir: " + baseDir);
    start_webServers(null); // only HTTP
  }

  O webServe(S uri, SS params) {
    ret new HttpFromFileSystem(newFile(baseDir), true).serve(uri);
  }
}

Author comment

Began life as a copy of #1027610

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027715
Snippet name: Test HttpFromFileSystem
Eternal ID of this version: #1027715/6
Text MD5: c744075b6cce297f2e829cefcdb26c30
Transpilation MD5: 88678c8ec866fb15525f136c18b49676
Author: stefan
Category:
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-04 17:37:41
Source code size: 409 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 132 / 290
Version history: 5 change(s)
Referenced in: [show references]