diff --git a/main.go b/main.go new file mode 100644 index 0000000..1dffd78 --- /dev/null +++ b/main.go @@ -0,0 +1,34 @@ +/* +Serve is a very simple static file server in go +Usage: + -p="8100": port to serve on + -d=".": the directory of static files to host +Navigating to http://localhost:8100 will display the index.html or directory +listing file. +*/ +package main + +import ( + "flag" + "log" + "net/http" + "os" + "path" + "path/filepath" +) + +func main() { + exePath, err := filepath.Abs(filepath.Dir(os.Args[0])) + if err != nil { + panic(err) + } + + port := flag.String("p", "8100", "port to serve on") + directory := flag.String("d", path.Join(exePath, "public"), "the directory of static file to host") + flag.Parse() + + http.Handle("/", http.FileServer(http.Dir(*directory))) + + log.Printf("Serving %s on HTTP port: %s\n", *directory, *port) + log.Fatal(http.ListenAndServe(":"+*port, nil)) +} diff --git a/css/custom.css b/public/css/custom.css similarity index 99% rename from css/custom.css rename to public/css/custom.css index 29dc879..0ea1061 100644 --- a/css/custom.css +++ b/public/css/custom.css @@ -112,6 +112,7 @@ th, td { } .skill-container { + min-width: 50px; display: inline-block; background-color: #555; width: 100%; diff --git a/css/normalize.css b/public/css/normalize.css similarity index 100% rename from css/normalize.css rename to public/css/normalize.css diff --git a/css/skeleton.css b/public/css/skeleton.css similarity index 100% rename from css/skeleton.css rename to public/css/skeleton.css diff --git a/index.html b/public/index.html similarity index 93% rename from index.html rename to public/index.html index c858e7d..1635ec1 100644 --- a/index.html +++ b/public/index.html @@ -58,7 +58,7 @@