mirror of https://github.com/dapr/quickstarts.git
assigning unique ports each app under go lang
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
This commit is contained in:
parent
9f86e54d12
commit
ea182d5610
|
|
@ -60,7 +60,7 @@ timeout_seconds: 30
|
|||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id batch-sdk --app-port 6002 --dapr-http-port 3502 --dapr-grpc-port 60002 --resources-path ../../../components -- go run .
|
||||
dapr run --app-id batch-sdk --app-port 6004 --dapr-http-port 3502 --dapr-grpc-port 60002 --resources-path ../../../components -- go run .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ func main() {
|
|||
var appPort string
|
||||
var okHost bool
|
||||
if appPort, okHost = os.LookupEnv("APP_PORT"); !okHost {
|
||||
appPort = "6002"
|
||||
appPort = "6004"
|
||||
}
|
||||
|
||||
r := mux.NewRouter()
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ sleep: 15
|
|||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
dapr run --app-port 6002 --app-id order-processor-sdk --app-protocol http --dapr-http-port 3501 --resources-path ../../../components -- go run .
|
||||
dapr run --app-port 6005 --app-id order-processor-sdk --app-protocol http --dapr-http-port 3501 --resources-path ../../../components -- go run .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ var sub = &common.Subscription{
|
|||
func main() {
|
||||
appPort := os.Getenv("APP_PORT")
|
||||
if appPort == "" {
|
||||
appPort = "6002"
|
||||
appPort = "6005"
|
||||
}
|
||||
|
||||
// Create the new server on appPort and add a topic listener
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ sleep: 15
|
|||
```bash
|
||||
cd ./order-processor
|
||||
dapr run \
|
||||
--app-port 6001 \
|
||||
--app-port 6006 \
|
||||
--app-id order-processor \
|
||||
--app-protocol http \
|
||||
--dapr-http-port 3501 \
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ version: 1
|
|||
apps:
|
||||
- appDirPath: ./order-processor/
|
||||
appID: order-processor
|
||||
appPort: 6001
|
||||
appPort: 6006
|
||||
command: ["go", "run", "."]
|
||||
- appID: checkout
|
||||
appDirPath: ./checkout/
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ func main() {
|
|||
|
||||
// Start the server listening on port 6001
|
||||
// This is a blocking call
|
||||
err := http.ListenAndServe(":6001", r)
|
||||
err := http.ListenAndServe(":6006", r)
|
||||
if err != http.ErrServerClosed {
|
||||
log.Println("Error starting HTTP server")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue