Skip to content

Commit

Permalink
internal application support
Browse files Browse the repository at this point in the history
  • Loading branch information
iesreza committed Jul 30, 2024
1 parent f344271 commit aedac74
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions evo.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package evo

import (
"github.com/getevo/evo/v2/lib/application"
"github.com/getevo/evo/v2/lib/settings"
"log"

Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -70,3 +74,7 @@ func Run() {
func GetFiber() *fiber.App {
return app
}

func Register(applications ...application.Application) *application.App {
return Application.Register(applications...)
}

0 comments on commit aedac74

Please sign in to comment.