Static file server in Go
Today I was trying to figure out how to write a simple (and fast) static file server in Go. As it turns out, this is very easy to do. Go contains (in the net/http package) a nice FileServer type that can server files from the directory you point it to.
By itself this is not very useful, but you can easily integrate this into any other http server you create, maybe for handling dynamic requests or doing web sockets.
My site is free of ads and trackers. Was this post helpful to you? Why not