Skip to content

Instantly share code, notes, and snippets.

@stefan-reich
Created February 14, 2016 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefan-reich/be55a6eae1b3f81bf32b to your computer and use it in GitHub Desktop.
Save stefan-reich/be55a6eae1b3f81bf32b to your computer and use it in GitHub Desktop.
Quick webserver in JavaX
// tinybrain.de/1001649
!752
p {
serveHttp(7777);
}
static NanoHTTPD.Response serve(S uri, NanoHTTPD.Method method,
Map<S,S> header, Map<S,S> parms, Map<S,S> files) {
print("Serving HTML.");
ret serveHTML("Hello world (as usual...)");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment