2017-06-18 22:01:44 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2017-06-26 18:44:37 +00:00
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/schrej/wings/api"
|
|
|
|
"github.com/schrej/wings/config"
|
|
|
|
"github.com/schrej/wings/tools"
|
|
|
|
log "github.com/sirupsen/logrus"
|
2017-06-18 22:01:44 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
// Version of pterodactyld
|
|
|
|
Version = "0.0.1-alpha"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2017-06-26 18:44:37 +00:00
|
|
|
fmt.Println("Loading configuration")
|
2017-06-26 19:04:11 +00:00
|
|
|
if err := config.LoadConfiguration(nil); err != nil {
|
2017-06-26 18:44:37 +00:00
|
|
|
log.WithError(err).Fatal("Failed to find configuration file")
|
|
|
|
}
|
2017-06-18 22:01:44 +00:00
|
|
|
tools.ConfigureLogging()
|
|
|
|
|
2017-06-26 09:07:53 +00:00
|
|
|
log.Info("Starting wings.go version ", Version)
|
2017-06-18 22:01:44 +00:00
|
|
|
|
|
|
|
// Load configuration
|
|
|
|
log.Info("Loading configuration...")
|
2017-06-26 09:07:53 +00:00
|
|
|
|
|
|
|
log.Info("Starting api webserver")
|
|
|
|
api := api.NewAPI()
|
|
|
|
api.Listen()
|
2017-06-18 22:01:44 +00:00
|
|
|
}
|