package main

import (
	"git.mowie.cc/konrad/Library/models"
	"git.mowie.cc/konrad/Library/routes"

	"fmt"
)

// UserLogin Object to recive user credentials in JSON format
type UserLogin struct {
	Username string `json:"username" form:"username"`
	Password string `json:"password" form:"password"`
}

func main() {

	// Init Config
	err := models.SetConfig()
	if err != nil {
		fmt.Println(err)
	}

	// Set Engine
	err = models.SetEngine()
	if err != nil {
		fmt.Println(err)
	}

	// Start the webserver
	e := routes.NewEcho()
	routes.RegisterRoutes(e)
	e.Start(models.Config.Interface)
}
