#!/bin/bash

set -eu
workdir=/var/app
config=$workdir/config-local.yaml
supergraph=$workdir/supergraph.graphql

if [ ! -f $config ]; then
  echo "$config not found" >&2
  exit 1
fi
if [ ! -f $supergraph ]; then
  echo "$supergraph not found" >&2
  exit 1
fi

echo "using $config"
$workdir/router --hot-reload -c $config -s $supergraph
