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

8
LINES

< > BotCompany Repo | #1023279 // serveHttpFromFunction

JavaX fragment (include)

1  
// function: func(S uri, SS params) -> NanoHTTPD.Response or string
2  
static MyHTTPD serveHttpFromFunction(int port, O function) ctex {
3  
  MyHTTPD server = new(port);
4  
  server.serveFunction = function;
5  
  server.start();
6  
  print("HTTP port " + port + " open");
7  
  ret server;
8  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1023279
Snippet name: serveHttpFromFunction
Eternal ID of this version: #1023279/8
Text MD5: 7965ffafefb5f322463bf69a3415afcc
Author: stefan
Category: javax / http
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-06-16 19:13:53
Source code size: 279 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 196 / 270
Version history: 7 change(s)
Referenced in: [show references]