chore: use get for quickstart, plain logs for easy understanding (#1905)

master
Kevin Wan 3 years ago committed by GitHub
parent 5d09cd0e7c
commit 7b82eda993
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,3 +1,5 @@
Name: ping Name: ping
Host: 127.0.0.1 Host: 127.0.0.1
Port: 8888 Port: 8888
Log:
Encoding: plain

@ -6,5 +6,5 @@ type resp {
service greet { service greet {
@handler ping @handler ping
post /ping returns (resp) get /ping returns (resp)
} }

@ -0,0 +1,4 @@
Name: greet.rpc
ListenOn: 127.0.0.1:8080
Log:
Encoding: plain

@ -10,16 +10,13 @@ import (
"github.com/zeromicro/go-zero/tools/goctl/util/pathx" "github.com/zeromicro/go-zero/tools/goctl/util/pathx"
) )
const ( const protoName = "greet.proto"
rpcEtcContent = `Name: greet.rpc
ListenOn: 127.0.0.1:8080
`
protoName = "greet.proto"
)
var ( var (
//go:embed idl/greet.proto //go:embed idl/greet.proto
protocContent string protocContent string
//go:embed idl/rpc.yaml
rpcEtcContent string
zRPCWorkDir string zRPCWorkDir string
) )

@ -74,6 +74,6 @@ func (m mono) start() {
goModTidy(projectDir) goModTidy(projectDir)
} }
log.Debug(">> Ready to start an API server...") log.Debug(">> Ready to start an API server...")
log.Debug(">> Run 'curl -X POST http://127.0.0.1:8888/ping' after service startup...") log.Debug(">> Run 'curl http://127.0.0.1:8888/ping' after service startup...")
goStart(apiWorkDir) goStart(apiWorkDir)
} }

Loading…
Cancel
Save