31 lines
666 B
Go
31 lines
666 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"git.eve.moe/jackyyf/navigator/api/beacon"
|
|
_ "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()
|
|
beacon.Initialize()
|
|
log.Println("HTTP server is running on", *listen_spec)
|
|
http.ListenAndServe(*listen_spec, nil)
|
|
}
|