git clone https://github.com/yashma-sonara/API_Gateway
Run following command:
go run main.go
https://nacos.io/en-us/docs/quick-start.html
cd distribution/target/nacos-server-[version]/nacos/bin
ORcd nacos/bin
- Windows
startup.cmd -m standalone
- Linux/Mac
sh startup.sh -m standalone
- Open a new terminal
- Navigate to RPC_Server directory
- Run following command:
- Windows:
bash build.sh
bash output/bootstrap.sh
- Linux/Git Bash:
sh build.sh
sh output/bootstrap.sh
You can view nacos registered services on: http://localhost:8848/nacos
Open a new terminal
Run following command:
-
request to call backend server:
curl -X GET "http://localhost:8888/ServiceA/methodB" -d "{"userId":"12312", "message":"Hello World!"}" -H "Content-type:application/json"
-
request to update IDL:
curl -X [HTTP_REQUEST_METHOD] http://localhost:8888/[serviceName]/ -d “{\“file\”:\”[idl_filepath]\”}” -H "Content-Type: application/json"