mirror of
https://github.com/yusing/godoxy.git
synced 2025-07-11 00:34:02 +02:00
codemirror 5 fix for config edit
This commit is contained in:
parent
2b298aa7fa
commit
c789c69c86
6 changed files with 10 additions and 8 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -4,5 +4,7 @@ config/**
|
||||||
|
|
||||||
bin/go-proxy.bak
|
bin/go-proxy.bak
|
||||||
|
|
||||||
|
templates/codemirror/
|
||||||
|
|
||||||
logs/
|
logs/
|
||||||
log/
|
log/
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
||||||
[submodule "templates/codemirror"]
|
|
||||||
path = templates/codemirror
|
|
||||||
url = https://github.com/codemirror/codemirror5.git
|
|
6
Makefile
6
Makefile
|
@ -8,6 +8,12 @@ setup:
|
||||||
[ -f config/providers.yml ] || touch config/providers.yml
|
[ -f config/providers.yml ] || touch config/providers.yml
|
||||||
[ -f compose.yml ] || cp compose.example.yml compose.yml
|
[ -f compose.yml ] || cp compose.example.yml compose.yml
|
||||||
|
|
||||||
|
setup-codemirror:
|
||||||
|
wget https://codemirror.net/5/codemirror.zip
|
||||||
|
unzip codemirror.zip
|
||||||
|
rm codemirror.zip
|
||||||
|
mv codemirror-* templates/codemirror
|
||||||
|
|
||||||
build:
|
build:
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
CGO_ENABLED=0 GOOS=linux go build -pgo=auto -o bin/go-proxy src/go-proxy/*.go
|
CGO_ENABLED=0 GOOS=linux go build -pgo=auto -o bin/go-proxy src/go-proxy/*.go
|
||||||
|
|
|
@ -67,7 +67,7 @@ In the examples domain `x.y.z` is used, replace them with your domain
|
||||||
|
|
||||||
4. Start `go-proxy` (see [Binary](#binary) or [docker](#docker))
|
4. Start `go-proxy` (see [Binary](#binary) or [docker](#docker))
|
||||||
|
|
||||||
5. (Optional) `git submodule update --init` in case you use web config editor
|
5. (Optional) `make setup-codemirror` in case you use the web config editor
|
||||||
|
|
||||||
6. Start editing config files
|
6. Start editing config files
|
||||||
- with text editor (i.e. Visual Studio Code)
|
- with text editor (i.e. Visual Studio Code)
|
||||||
|
|
|
@ -37,8 +37,6 @@ func main() {
|
||||||
cfg = NewConfig(configPath)
|
cfg = NewConfig(configPath)
|
||||||
cfg.MustLoad()
|
cfg.MustLoad()
|
||||||
|
|
||||||
logrus.Info(cfg.Value())
|
|
||||||
|
|
||||||
if args.Command == CommandValidate {
|
if args.Command == CommandValidate {
|
||||||
logrus.Printf("config OK")
|
logrus.Printf("config OK")
|
||||||
return
|
return
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 0c8456c3bc92fb3085ac636f5ed117df24e22ca7
|
|
Loading…
Add table
Reference in a new issue