Skip to content

Commit

Permalink
Using DGRAPH_ENDPOINT env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
prashant-shahi committed Aug 6, 2019
1 parent 723d271 commit 419d01b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions layouts/partials/header.html
Expand Up @@ -41,9 +41,10 @@

<script>
{{ $currentBranch := getenv "CURRENT_BRANCH" }}
{{ $dgraphEndpoint := getenv "DGRAPH_ENDPOINT" }}

{{/* Set dgraph endpoint depending on version to ensure that runnables work fine */}}
window.DGRAPH_ENDPOINT = {{ if eq $currentBranch "master" }}"https://play-master.dgraph.io/query?latency=true"{{ else }}"https://play.dgraph.io/query?latency=true"{{ end }}
{{/* Set dgraph endpoint depending on the DGRAPH_ENDPOINT environment variable in the script local.sh to ensure that runnables work fine */}}
window.DGRAPH_ENDPOINT = {{ if (eq $dgraphEndpoint "" ) }}"https://play.dgraph.io/query?latency=true"{{ else }}{{ $dgraphEndpoint }}{{ end }}
</script>

<title>
Expand Down

0 comments on commit 419d01b

Please sign in to comment.