31 lines
1.8 KiB
Go
31 lines
1.8 KiB
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"log"
|
|
)
|
|
|
|
func main() {
|
|
mux := http.NewServeMux()
|
|
|
|
mux.Handle("GET /dice-library/", http.StripPrefix("/dice-library", http.FileServer(http.Dir("dice-library"))))
|
|
mux.Handle("GET /dice-library-es-modules/", http.StripPrefix("/dice-library-es-modules", http.FileServer(http.Dir("dice-library-es-modules"))))
|
|
mux.Handle("GET /treasure-chest/", http.StripPrefix("/treasure-chest", http.FileServer(http.Dir("treasure-chest"))))
|
|
mux.Handle("GET /treasure-chest-chaining-static/", http.StripPrefix("/treasure-chest-chaining-static", http.FileServer(http.Dir("treasure-chest-chaining-static"))))
|
|
mux.Handle("GET /treasure-chest-user-options/", http.StripPrefix("/treasure-chest-user-options", http.FileServer(http.Dir("treasure-chest-user-options"))))
|
|
mux.Handle("GET /treasure-chest-js-class/", http.StripPrefix("/treasure-chest-js-class", http.FileServer(http.Dir("treasure-chest-js-class"))))
|
|
mux.Handle("GET /treasure-chest-private/", http.StripPrefix("/treasure-chest-private", http.FileServer(http.Dir("treasure-chest-private"))))
|
|
mux.Handle("GET /treasure-chest-custom-events/", http.StripPrefix("/treasure-chest-custom-events", http.FileServer(http.Dir("treasure-chest-custom-events"))))
|
|
mux.Handle("GET /dice-component/", http.StripPrefix("/dice-component", http.FileServer(http.Dir("dice-component"))))
|
|
mux.Handle("GET /dice-component-interactivity/", http.StripPrefix("/dice-component-interactivity", http.FileServer(http.Dir("dice-component-interactivity"))))
|
|
mux.Handle("GET /seven-seas/", http.StripPrefix("/seven-seas", http.FileServer(http.Dir("seven-seas"))))
|
|
mux.Handle("GET /seven-seas-bundlers/", http.StripPrefix("/seven-seas-bundlers", http.FileServer(http.Dir("seven-seas-bundlers"))))
|
|
|
|
log.Println("Start the web server...")
|
|
err := http.ListenAndServe(":8080", mux)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
}
|