1234567891011121314151617181920212223242526272829 |
- package main
- import (
- "baize-playground/server/application"
- DEATH "github.com/vrecan/death"
- "syscall"
- )
- func main() {
- application.NewApp()
- defer application.DestroyApp()
- go func() {
- err := application.Start()
- if err != nil {
- panic(err)
- }
- }()
- defer func() {
- err := application.Finish()
- if err != nil {
- panic(err)
- }
- }()
- death := DEATH.NewDeath(syscall.SIGINT, syscall.SIGTERM)
- _ = death.WaitForDeath()
- }
|