Libraryless. Click here for Pure Java version (2379L/18K/47K).
1 | !747 |
2 | |
3 | m {
|
4 | static S botID = "#1001782"; |
5 | static Class bot; |
6 | |
7 | p {
|
8 | bot = hotwire(botID); |
9 | serveHttp(7778); |
10 | } |
11 | |
12 | static NanoHTTPD.Response serve(S uri, NanoHTTPD.Method method, |
13 | Map<S,S> header, Map<S,S> parms, Map<S,S> files) {
|
14 | print("Serving HTTP " + quote(uri) + " from " + botID);
|
15 | ret serveHTML((S) callOpt(bot, "html")); |
16 | } |
17 | } |
Began life as a copy of #1001649
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1001784 |
| Snippet name: | Connect an http() bot as web server |
| Eternal ID of this version: | #1001784/1 |
| Text MD5: | d59fb2e6c0249466c78581c21de773e5 |
| Transpilation MD5: | fd7c73ad2b0c3889679d4fff3a3dce43 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-11-27 16:47:30 |
| Source code size: | 371 bytes / 17 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 936 / 1018 |
| Referenced in: | [show references] |