Libraryless. Click here for Pure Java version (3004L/23K/61K).
1 | !7 |
2 | |
3 | p { |
4 | int port = serveHttp(); // find a free port |
5 | S url = print("http://localhost:" + port); |
6 | openPlatformBrowser(url); |
7 | } |
8 | |
9 | static NanoHTTPD.Response serve(S uri, NanoHTTPD.Method method, |
10 | Map<S,S> header, Map<S,S> parms, Map<S,S> files) { |
11 | print("Serving HTML."); |
12 | ret serveHTML("Hello world (as usual...)"); |
13 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, wtqryiryparv
No comments. add comment
Snippet ID: | #1008414 |
Snippet name: | Test embedding web server in desktop app |
Eternal ID of this version: | #1008414/4 |
Text MD5: | 8779205616a019159720b258117a522c |
Transpilation MD5: | f107be6e5a8b685030f1db16b41f2c1e |
Author: | stefan |
Category: | javax / desktop |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-05-15 14:10:15 |
Source code size: | 334 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 483 / 630 |
Version history: | 3 change(s) |
Referenced in: | [show references] |