doc: update readme (#837)

pull/838/head
另维64 4 years ago committed by GitHub
parent e1fe688e0c
commit 089cf9d0cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 22
      examples/blog/README.md

@ -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…
Cancel
Save