import sources from develop/0.1.0
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/joho/godotenv"
|
||||
application "gitlab.com/tpeetz-kontor/kontor-go/pkg/infrastructure/app"
|
||||
"gitlab.com/tpeetz-kontor/kontor-go/pkg/infrastructure/kernel"
|
||||
)
|
||||
|
||||
// init is invoked before main()
|
||||
func init() {
|
||||
// loads values from .env into the system
|
||||
if err := godotenv.Load(); err != nil {
|
||||
panic("No .env file found")
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
// Create our application
|
||||
app := kernel.Boot()
|
||||
|
||||
// Build our services
|
||||
//ping.BuildPingService(app)
|
||||
|
||||
// Run our Application in a coroutine
|
||||
go func() {
|
||||
app.Run()
|
||||
}()
|
||||
|
||||
// Wait for termination signals and shut down gracefully
|
||||
application.WaitForShutdown(app)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user