|
@ -10,6 +10,7 @@ import ( |
|
|
"git.chrishayward.xyz/x/users/proto" |
|
|
"git.chrishayward.xyz/x/users/proto" |
|
|
"git.chrishayward.xyz/x/users/server" |
|
|
"git.chrishayward.xyz/x/users/server" |
|
|
"google.golang.org/grpc" |
|
|
"google.golang.org/grpc" |
|
|
|
|
|
"google.golang.org/grpc/reflection" |
|
|
"gopkg.in/yaml.v3" |
|
|
"gopkg.in/yaml.v3" |
|
|
"gorm.io/driver/postgres" |
|
|
"gorm.io/driver/postgres" |
|
|
"gorm.io/driver/sqlite" |
|
|
"gorm.io/driver/sqlite" |
|
@ -73,6 +74,7 @@ func main() { |
|
|
// Start listening for requests.
|
|
|
// Start listening for requests.
|
|
|
srv := grpc.NewServer() |
|
|
srv := grpc.NewServer() |
|
|
proto.RegisterUsersServer(srv, server.NewUsersServer(config.Secret, db)) |
|
|
proto.RegisterUsersServer(srv, server.NewUsersServer(config.Secret, db)) |
|
|
|
|
|
reflection.Register(srv) |
|
|
log.Printf("Listening on :%d", config.Port) |
|
|
log.Printf("Listening on :%d", config.Port) |
|
|
srv.Serve(lis) |
|
|
srv.Serve(lis) |
|
|
} |
|
|
} |