Uses 911K of libraries. Click here for Pure Java version (7852L/43K).
1 | !7 |
2 | |
3 | cmodule TestHttpFromFileSystem > DynPrintLogAndEnabled { |
4 | !include #1027628 // HTTP+HTTPS servers |
5 | |
6 | S baseDir = f2s(prepareProgramDir()); |
7 | |
8 | start { |
9 | saveProgramTextFile("hello.html", b("BOLD")); |
10 | print("Base dir: " + baseDir); |
11 | start_webServers(null); // only HTTP |
12 | } |
13 | |
14 | O webServe(S uri, SS params) { |
15 | ret new HttpFromFileSystem(newFile(baseDir), true).serve(uri); |
16 | } |
17 | } |
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: | 219 / 405 |
Version history: | 5 change(s) |
Referenced in: | [show references] |