- install protobuf
sudo apt install protobuf-compiler
sudo apt install golang-goprotobuf-devor
https://repo1.maven.org/maven2/com/google/protobuf/protoc
- gen proto file
just protoc- build java code
- custom justFile set your mvn path
- add application-prod.yml
just build
just runServer- register client
curl --location --request POST 'http://114.132.249.192/:10086/register' \
--header 'Content-Type: application/json' \
--data-raw '{
"ports": [
"63342" // client wants exposed port
]
}'
// response
{"token":"348f952bb76e44d5a818440ef1bec53a"}- run client
cd burst-client
# get usage
go run . -u
go run . -sip {{serverIp}} -sp {{serverPort}} -t {{token}}will output:
{
"level": "info",
"message": "init success map[46233:63342]",
"time": "2022-05-22 21:20:32 555"
}46233 is the port exposed by server => serverIp:46233
to access serverIp:46233 is to access localhost:633242