Documentation
¶
Overview ¶
Command fasthttpserver is a fasthttp server that works with both TinyGo and standard Go. Under TinyGo, the blank import registers the host Netdever so the net package can use the OS TCP stack, and -tags noasm is required because TinyGo cannot link klauspost/compress's zstd assembly.
tinygo build -tags noasm -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.