fleet/tools/file-server/main.go
Lucas Manuel Rodriguez b5be858071
Fix update checks for orbit at startup (#3835)
* Fix update checks for orbit at startup

* Add tests

* Add scripts for testing local TUF server

* Remove -x used for debugging
2022-02-23 14:58:07 -03:00

16 lines
218 B
Go

package main
import (
"net/http"
"os"
)
func main() {
fs := http.FileServer(http.FS(os.DirFS(os.Args[2])))
http.Handle("/", fs)
err := http.ListenAndServe(":"+os.Args[1], nil)
if err != nil {
panic(err)
}
}