Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Simplest web server to handle static content
@Typed package example
import org.mbte.gretty.httpserver.GrettyServer
new GrettyServer() [
// server local address
localAddress: new InetSocketAddress(8081),
// directory where to find static resources
static: "../static",
default: {
redirect "/test.html"
].start ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment