first commit

This commit is contained in:
Gregory Salaun 2024-08-30 12:36:02 +07:00
commit 919a6124e6

26
GoRacerr.go Normal file
View File

@ -0,0 +1,26 @@
package main
import (
"io"
"log"
"os"
)
func main() {
// Get app path
pwd, _ := os.Getwd()
cfg := NewConfig(pwd)
// Log
file, _ := os.OpenFile("goracerr.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
mw := io.MultiWriter(os.Stdout, file)
log.SetOutput(mw)
log.SetPrefix("[GoRacerr]")
defer file.Close()
log.Printf("Starting GoRacerr on %s", cfg.Host)
server := NewAPIServer(cfg)
server.Start()
}