Implement saving and loading for account data, currently a basic json file
This commit is contained in:
parent
f1e6311366
commit
179dd3f984
11 changed files with 306 additions and 130 deletions
|
@ -1,34 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/mdiluz/rove/pkg/server"
|
||||
)
|
||||
|
||||
var port = flag.Int("port", 8080, "The port to host on")
|
||||
|
||||
func main() {
|
||||
server := server.NewServer(*port)
|
||||
|
||||
fmt.Println("Initialising...")
|
||||
|
||||
server.Initialise()
|
||||
|
||||
// Set up the close handler
|
||||
c := make(chan os.Signal)
|
||||
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
||||
go func() {
|
||||
<-c
|
||||
fmt.Println("SIGTERM recieved, exiting...")
|
||||
os.Exit(0)
|
||||
}()
|
||||
|
||||
fmt.Println("Initialised")
|
||||
|
||||
server.Run()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue