Documentation
¶
Overview ¶
Command fasthttpserver is a fasthttp server that works with both TinyGo and standard Go, routing through the fasthttprouter fork. Under TinyGo, the blank import registers the host Netdever so the net package can use the OS TCP stack. No build tags are needed on either compiler.
tinygo build -o server ./examples/fasthttpserver && ./server go run ./examples/fasthttpserver
Optional environment variables:
ADDR listen address (default 127.0.0.1:8080; port 0 does not work under
TinyGo, whose Listener reports the address it was asked for)
STATIC directory to serve under /static/ (default: route disabled)
Click to show internal directories.
Click to hide internal directories.