Add address to the conf file
parent
0fc30ab1b6
commit
a521812e3e
|
@ -41,6 +41,7 @@ You can either use flags or a JSON configuration file, which should have the fol
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"port": 80,
|
"port": 80,
|
||||||
|
"address": "127.0.0.1",
|
||||||
"database": "/path/to/database.db",
|
"database": "/path/to/database.db",
|
||||||
"scope": "/path/to/my/files",
|
"scope": "/path/to/my/files",
|
||||||
"allowCommands": true,
|
"allowCommands": true,
|
||||||
|
|
|
@ -19,6 +19,7 @@ import (
|
||||||
type confFile struct {
|
type confFile struct {
|
||||||
Database string `json:"database"`
|
Database string `json:"database"`
|
||||||
Scope string `json:"scope"`
|
Scope string `json:"scope"`
|
||||||
|
Address string `json:"address"`
|
||||||
Commands []string `json:"commands"`
|
Commands []string `json:"commands"`
|
||||||
Port int `json:"port"`
|
Port int `json:"port"`
|
||||||
AllowCommands bool `json:"allowCommands"`
|
AllowCommands bool `json:"allowCommands"`
|
||||||
|
@ -99,6 +100,7 @@ func loadConfig() {
|
||||||
|
|
||||||
database = conf.Database
|
database = conf.Database
|
||||||
scope = conf.Scope
|
scope = conf.Scope
|
||||||
|
addr = conf.Address
|
||||||
commands = strings.Join(conf.Commands, " ")
|
commands = strings.Join(conf.Commands, " ")
|
||||||
port = strconv.Itoa(conf.Port)
|
port = strconv.Itoa(conf.Port)
|
||||||
allowNew = conf.AllowNew
|
allowNew = conf.AllowNew
|
||||||
|
|
Loading…
Reference in New Issue