mirror of
https://github.com/go-kratos/kratos.git
synced 2025-03-17 21:07:54 +02:00
doc: update readme (#837)
This commit is contained in:
parent
e1fe688e0c
commit
089cf9d0cb
@ -13,16 +13,20 @@ cd cmd/protoc-gen-go-errors && go install
|
||||
```
|
||||
## Create a service
|
||||
```
|
||||
# create a template project
|
||||
kratos new helloworld
|
||||
# create project template
|
||||
kratos new blog
|
||||
|
||||
cd helloworld
|
||||
# Add a proto template
|
||||
kratos proto add api/helloworld/helloworld.proto
|
||||
# Generate the source code of service by proto file
|
||||
kratos proto service api/helloworld/helloworld.proto -t internal/service
|
||||
# download modules
|
||||
go mod download
|
||||
|
||||
make proto
|
||||
make build
|
||||
make test
|
||||
# generate Proto template
|
||||
kratos proto add api/blog/blog.proto
|
||||
# generate Proto source code
|
||||
kratos proto client api/blog/blog.proto
|
||||
# generate server template
|
||||
kratos proto server api/blog/blog.proto -t internal/service、
|
||||
|
||||
# generate all proto source code, wire, etc.
|
||||
go generate ./...
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user