Skip to content

Commit

Permalink
Add fileserver script
Browse files Browse the repository at this point in the history
  • Loading branch information
eatonphil committed Jul 11, 2023
1 parent aaac85b commit 23f4c34
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/fileserver.go
@@ -0,0 +1,16 @@
package main

import (
"log"
"os"
"net/http"
)

func main() {
port := os.Args[1]

http.Handle("/", http.FileServer(http.Dir(".")))

log.Printf("Serving . on HTTP port: %s\n", port)
log.Fatal(http.ListenAndServe(":"+port, nil))
}

0 comments on commit 23f4c34

Please sign in to comment.