Evan Chen 9d95d31427 | ||
---|---|---|
configui | ||
public | ||
src | ||
templates | ||
.dockerignore | ||
.gitignore | ||
CHANGELOG.md | ||
Dockerfile | ||
Makefile | ||
README.md | ||
api.go | ||
go.mod | ||
insomnia.json | ||
main.go | ||
netutil.go | ||
package-lock.json | ||
package.json | ||
release.sh | ||
route.go | ||
util.go |
README.md
Config UI
a web app to edit and action on update powered by ACE
Usage: configui [options]
-allow string
IPs to allow, blank to allow all
-bind string
address to bind (default "0.0.0.0:8000")
-c string
cmd to apply
-f string
path to config file
-log string
log to file
-n string
alias of file
-p string
path to file, precedence over config
-static
disable config api
-v show version
Config
[
{
"path": "configui.log",
"ro": true
},
{
"path": "etc/test.ini",
"name": "test",
"action": "myip local -P"
}
]
configui -f PATH/TO/CONFIG
Api
Files
GET /api/files
res:
{
"test": {
"path": "test",
"name": "test",
"action": "myip local -P",
"data": ""
}
}
File
GET /api/file?name=ALIAS
res:
{
"action": "myip local -P",
"data": "test",
"name": "test",
"path": "test"
}
Update
POST /api/file
req:
{
"data": "test",
"name": "test",
}
Apply
POST /api/apply?name=ALIAS