Specify the persistence path using the command line
This commit is contained in:
parent
c085e56954
commit
5033ec4e63
5 changed files with 36 additions and 18 deletions
3
main.go
3
main.go
|
@ -13,6 +13,7 @@ import (
|
|||
|
||||
var ver = flag.Bool("version", false, "Display version number")
|
||||
var port = flag.Int("port", 8080, "The port to host on")
|
||||
var data = flag.String("data", "/tmp/", "Directory to store persistant data")
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
@ -24,7 +25,7 @@ func main() {
|
|||
|
||||
s := server.NewServer(
|
||||
server.OptionPort(*port),
|
||||
server.OptionPersistentData())
|
||||
server.OptionPersistentData(*data))
|
||||
|
||||
fmt.Println("Initialising...")
|
||||
if err := s.Initialise(); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue