xo-grpc

command module
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 17 Imported by: 0

README

xo-grpc

Create a gRPC (and HTTP/JSON provided by grpc-gateway reverse proxy) Server from the generated code by the xo project.

Requirements

  • Go 1.20 or superior
  • xo
  • buf
go install github.com/xo/xo@latest
go install github.com/bufbuild/buf/cmd/buf@latest

Installation

go install github.com/walterwanderley/xo-grpc@latest

Example

  1. Generate go code to access your database using xo. For more informations about xo command line parameters, please visit the xo Documentation
mkdir models
xo schema -o models [Database Connection URL] 
  1. Execute xo-grpc to generate the gRPC Server boilerplate code:
xo-grpc models
  1. Run the generated server:
go run . -db [Database Connection URL] -dev -grpcui
  1. Enjoy!

Similar Projects

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL