Go to file
Evan Chen b1b7ca737b fix: #20 2021-10-21 02:20:45 +08:00
configui fix: #20 2021-10-21 02:20:45 +08:00
public Merge wip/editor (#13) 2021-10-20 15:58:14 +00:00
src Merge wip/editor (#13) 2021-10-20 15:58:14 +00:00
templates Merge wip/editor (#13) 2021-10-20 15:58:14 +00:00
.dockerignore build: add npm 2021-10-19 14:32:10 +08:00
.gitignore Merge wip/editor (#13) 2021-10-20 15:58:14 +00:00
CHANGELOG.md docs: update 2021-10-21 01:47:23 +08:00
Dockerfile release: 0.1.0 2021-10-21 00:19:32 +08:00
Makefile release: 0.1.0 2021-10-21 00:19:32 +08:00
README.md docs: update install script and unit file 2021-10-21 01:23:54 +08:00
api.go feat: #14, #9 2021-10-21 01:20:20 +08:00
go.mod first commit 2021-10-18 16:49:16 +08:00
insomnia.json fix #4, #1 2021-10-18 23:53:49 +08:00
main.go fix: #16 2021-10-21 01:26:05 +08:00
netutil.go feat: #14, #9 2021-10-21 01:20:20 +08:00
package-lock.json Merge wip/editor (#13) 2021-10-20 15:58:14 +00:00
package.json Merge wip/editor (#13) 2021-10-20 15:58:14 +00:00
release.sh first commit 2021-10-18 16:49:16 +08:00
route.go feat: #14, #9 2021-10-21 01:20:20 +08:00
util.go Merge wip/editor (#13) 2021-10-20 15:58:14 +00:00

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

Install

sudo rm -f /usr/local/bin/configui
sudo sh -c "curl -fsSL RELEASE_URL | tar -C /usr/local/bin/ -xz"

Config

[
	{
		"path": "configui.log",
		"ro": true
	},
	{
		"path": "etc/test.ini",
		"name": "test",
		"action": "myip local -P"
	}
]

configui -f PATH/TO/CONFIG

Systemd

; /etc/systemd/system/configui.service
[Unit]
Description=CoonfigUI Server

[Service]
WorkingDirectory=/home/ubuntu/ConfigUI
ExecStart=configui -log access.log -f conf.json -bind 0.0.0.0:80
Restart=always

[Install]
WantedBy=multi-user.target

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