feat: update framework
This commit is contained in:
@@ -4,26 +4,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
serviceHttp "backend/services"
|
||||
"backend/common/service/http"
|
||||
"backend/common/service/migrate"
|
||||
|
||||
"git.ipao.vip/rogeecn/atom"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func main() {
|
||||
providers := serviceHttp.Default()
|
||||
|
||||
opts := []atom.Option{
|
||||
atom.Name("backend"),
|
||||
atom.RunE(func(cmd *cobra.Command, args []string) error {
|
||||
return serviceHttp.Serve()
|
||||
}),
|
||||
atom.Name("qvyun"),
|
||||
http.Command(),
|
||||
migrate.Command(),
|
||||
}
|
||||
|
||||
if err := atom.Serve(providers, opts...); err != nil {
|
||||
if err := atom.Serve(opts...); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user