This repository has been archived on 2024-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
minifaas/main.go

22 lines
274 B
Go
Raw Normal View History

2021-05-02 11:47:08 +00:00
package main
import (
"log"
"os"
"os/signal"
"syscall"
2021-05-02 11:47:08 +00:00
)
func main() {
a := NewApp()
go a.Start()
2021-05-02 11:47:08 +00:00
quit := make(chan os.Signal)
signal.Notify(quit, os.Interrupt, syscall.SIGTERM)
<-quit
log.Println("Stopping the service...")
a.Stop()
log.Println("Stopped")
2021-05-02 11:47:08 +00:00
}