25 lines
375 B
Go
25 lines
375 B
Go
|
//go:build !single
|
||
|
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"go.unistack.org/cms-template/service"
|
||
|
"go.unistack.org/micro/v3/logger"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
ctx := context.Background()
|
||
|
|
||
|
svc, err := service.NewService(ctx)
|
||
|
if err != nil {
|
||
|
logger.Fatalf(ctx, "failed to create service: %v", err)
|
||
|
}
|
||
|
|
||
|
// start server
|
||
|
if err := svc.Run(); err != nil {
|
||
|
logger.Fatal(ctx, err)
|
||
|
}
|
||
|
}
|