diff options
| author | Shulhan <m.shulhan@gmail.com> | 2020-05-18 21:47:45 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2020-07-26 03:48:51 +0700 |
| commit | 7574bb6ebff609b9a2889fc573ce3edce256e030 (patch) | |
| tree | d4a118ef858d5916ed19e1fc93a4d02b9fe4b588 /internal | |
| parent | 7b9cba12d356c6fa9ee3988b5c96f8718aafd5f1 (diff) | |
| download | rescached-7574bb6ebff609b9a2889fc573ce3edce256e030.tar.xz | |
all: implement the user interface to change configuration
This is the first web UI (wui) where user can change configuration on
the fly.
The wui is implemented using svelte.dev and can be accessed on
http://127.0.0.1:5380.
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/generate_memfs.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/internal/generate_memfs.go b/internal/generate_memfs.go new file mode 100644 index 0000000..552b924 --- /dev/null +++ b/internal/generate_memfs.go @@ -0,0 +1,31 @@ +// Copyright 2020, Shulhan <ms@kilabit.info>. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +package main + +import ( + "log" + + "github.com/shuLhan/share/lib/memfs" +) + +func main() { + includes := []string{ + `.*\.html`, + `.*\.js`, + `.*\.css`, + } + + mfs, err := memfs.New("_www/public/", includes, nil, true) + if err != nil { + log.Fatal(err) + } + + err = mfs.GoGenerate("main", "cmd/rescached/memfs.go", memfs.EncodingGzip) + if err != nil { + log.Fatal(err) + } +} |
