/go-static-file-server-example

A Golang static file server example.

Primary LanguageGoMIT LicenseMIT

go-static-file-server-example

Build Status Go Report Card

A Golang static file server example.

Notes

  • Make sure that the path passed in http.FileServer(http.Dir("XX")) is ABSOLUTE.
  • http.Dir("./static") works only if PWD is the server root dir.
  • Use GetCurrentExecDir to get absolute path of server root(current executable).

References