go get -u github.com/no-src/fserver
package main
import (
"embed"
"github.com/no-src/fserver"
"github.com/no-src/log"
)
// webDist the web dist resource
//
//go:embed dist
var webDist embed.FS
func main() {
defer log.Close()
exit, port := fserver.InitFlag(printVersion, printAboutInfo)
if exit {
return
}
fserver.Run(port, "/dist", webDist)
}
func printVersion() {
log.Log("version info")
}
func printAboutInfo() {
log.Log("about info")
}