package main

import (
	"time"

	"git.gocasts.ir/ebhomengo/niki/patientapp"
	"git.gocasts.ir/ebhomengo/niki/patientapp/config"
	"git.gocasts.ir/ebhomengo/niki/patientapp/repository/mysql"
)

func main() {
	db := mysql.DataBase{}

	cfg := config.Config{
		Port: 8080,
		Cors: config.Cors{
			AllowOrigins: []string{"*"},
		},
		ShutDownCtxTimeout: 5 * time.Second,
	}

	app := patientapp.Setup(cfg, &db)

	app.Start()

}
