github.com/maeglindeveloper/gqlgen@v0.13.1-0.20210413081235-57808b12a0a0/example/federation/start.sh (about)

     1  #!/bin/bash
     2  
     3  function cleanup {
     4      kill "$ACCOUNTS_PID"
     5      kill "$PRODUCTS_PID"
     6      kill "$REVIEWS_PID"
     7  }
     8  trap cleanup EXIT
     9  
    10  go build -o /tmp/srv-accounts ./accounts
    11  go build -o /tmp/srv-products ./products
    12  go build -o /tmp/srv-reviews ./reviews
    13  
    14  /tmp/srv-accounts &
    15  ACCOUNTS_PID=$!
    16  
    17  /tmp/srv-products &
    18  PRODUCTS_PID=$!
    19  
    20  /tmp/srv-reviews &
    21  REVIEWS_PID=$!
    22  
    23  sleep 1
    24  
    25  node gateway/index.js