navigator/main.go

29 lines
601 B
Go

package main
import (
"flag"
_ "git.eve.moe/jackyyf/navigator/api/beacon/v1"
_ "git.eve.moe/jackyyf/navigator/api/navigator"
"git.eve.moe/jackyyf/navigator/ipgeo"
"git.eve.moe/jackyyf/navigator/mapping"
"github.com/sirupsen/logrus"
"log"
"net/http"
_ "net/http/pprof"
"os"
)
var (
listen_spec = flag.String("bind", "127.0.0.1:8086", "http server bind spec")
)
func main() {
flag.Parse()
logrus.SetReportCaller(true)
logrus.SetOutput(os.Stderr)
ipgeo.Initialize()
mapping.Initialize()
log.Println("HTTP server is running on", *listen_spec)
http.ListenAndServe(*listen_spec, nil)
}