WIP Svelte

This commit is contained in:
nemunaire 2021-11-18 12:12:28 +01:00
parent 38180f8afd
commit ded0e8e1c8
48 changed files with 3976 additions and 46 deletions

View file

@ -59,6 +59,7 @@ func StripPrefix(prefix string, h http.Handler) http.Handler {
func main() {
var bind = flag.String("bind", ":8081", "Bind port/socket")
var dsn = flag.String("dsn", DSNGenerator(), "DSN to connect to the MySQL server")
var dummyauth = flag.Bool("dummy-auth", false, "If set, allow any authentication credentials")
flag.StringVar(&DevProxy, "dev", DevProxy, "Proxify traffic to this host for static assets")
flag.StringVar(&baseURL, "baseurl", baseURL, "URL prepended to each URL")
flag.UintVar(&currentPromo, "current-promo", currentPromo, "Year of the current promotion")
@ -77,6 +78,10 @@ func main() {
baseURL = ""
}
if dummyauth != nil && *dummyauth == true {
LocalAuthFunc = dummyAuth
}
if DevProxy != "" {
Router().GET("/.svelte-kit/*_", serveOrReverse(""))
Router().GET("/node_modules/*_", serveOrReverse(""))