rclone/fs/rc/js/serve.go

20 lines
374 B
Go
Raw Normal View History

2021-09-09 14:25:25 +02:00
//go:build none
package main
import (
"fmt"
"log"
"mime"
"net/http"
)
func main() {
mime.AddExtensionType(".wasm", "application/wasm")
mime.AddExtensionType(".js", "application/javascript")
mux := http.NewServeMux()
mux.Handle("/", http.FileServer(http.Dir(".")))
fmt.Printf("Serving on http://localhost:3000/\n")
log.Fatal(http.ListenAndServe(":3000", mux))
}