From aedac747e4573c174ff7e2fe121ddbb808fce6d3 Mon Sep 17 00:00:00 2001 From: Reza Date: Tue, 30 Jul 2024 16:07:28 +0200 Subject: [PATCH] internal application support --- evo.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/evo.go b/evo.go index 7b5985b..b003cea 100644 --- a/evo.go +++ b/evo.go @@ -1,6 +1,7 @@ package evo import ( + "github.com/getevo/evo/v2/lib/application" "github.com/getevo/evo/v2/lib/settings" "log" @@ -16,9 +17,11 @@ var ( ) var http = HTTPConfig{} var fiberConfig = fiber.Config{} +var Application *application.App // Setup set up the EVO app func Setup() { + Application = application.GetInstance() var err = settings.Init() if err != nil { log.Fatal(err) @@ -44,6 +47,7 @@ func Setup() { // Run start EVO Server func Run() { + Application.Run() if Any != nil { app.Use(func(ctx *fiber.Ctx) error { r := Upgrade(ctx) @@ -70,3 +74,7 @@ func Run() { func GetFiber() *fiber.App { return app } + +func Register(applications ...application.Application) *application.App { + return Application.Register(applications...) +}