bmallred 9 years ago
commit
2f330b8cca
1 changed files with 17 additions and 0 deletions
  1. 17 0
      main.go

+ 17 - 0
main.go

@ -0,0 +1,17 @@
1
package main
2
3
import (
4
	"log"
5
	"net/http"
6
	"path/filepath"
7
)
8
9
func main() {
10
	d, err := filepath.Abs(".")
11
	if err != nil {
12
		log.Fatal(err)
13
	}
14
15
	log.Println("Server running at http://localhost:8000")
16
	log.Fatal(http.ListenAndServe(":8000", http.FileServer(http.Dir(d))))
17
}