Nano http web server written in go lang
Nano http web server written in go lang.
PORT
environment variable wget https://raw.githubusercontent.com/genesem/nanoserv/master/nanoserv.go
go build nanoserv.go && ./nanoserv
By default web server listen on :3000 tcp port.
How to use custom port and web root: ./nanoserv -addr=:3001 -root=/var/www
Use ./nanoserv -h
for help with flags.
Client side content caching is disabled, i.e. server is sending http header:
Cache-Control: no-cache, no-store, must-revalidate
Nanoserv is now using os.LookupEnv("PORT")
instead of os.Getenv("PORT")
,
so the minimum version of the Go compiler required is Go 1.5