initial commit
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"backbone/internal/app/handler/debugh"
|
||||
"backbone/internal/pkg/app"
|
||||
svc "backbone/pkg/pb/api/services"
|
||||
"log"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
func main() {
|
||||
a := app.New(
|
||||
app.WithSwaggerUI(),
|
||||
app.WithStatic(),
|
||||
)
|
||||
|
||||
debugH := debugh.New()
|
||||
|
||||
a.RegisterServices(func(gs *grpc.Server) {
|
||||
svc.RegisterDebugAPIServer(gs, debugH)
|
||||
})
|
||||
|
||||
a.RegisterGateways(
|
||||
svc.RegisterDebugAPIHandler,
|
||||
)
|
||||
|
||||
if err := a.ListenAndServe(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user