Skip to content

Commit

Permalink
merge?
Browse files Browse the repository at this point in the history
  • Loading branch information
santolucito committed Feb 28, 2024
2 parents 9f671e1 + a29c173 commit 93a3c25
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,20 @@ Follow the directions here: https://cloud.google.com/run/docs/tutorials/system-p

To test locally

```
docker build -t tsl/api . #use --no-cache to ensure a fresh build
docker run -d -p 8080:8080 tsl/api
```

then go to localhost:8080. note that this only works with port 8080

to deploy

```
docker build -t tsl/api .
gcloud builds submit --tag gcr.io/tslapi-2/tsl --timeout=1h
gcloud run deploy graphviz-web --image gcr.io/tslapi-2/tsl
```

you need to set a longer time out since it takes so long to build (30 min maybe?).

Expand Down
8 changes: 6 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@
function callSynth() {
let tslSpec = document.getElementById("specBox").value;
let targetLang = document.getElementById("targetLang").value;
$.post("https://graphviz-web-vvxsiayuzq-ue.a.run.app/tslsynth", {tsl: tslSpec, target: targetLang, id: userID}, function(data){
$.post("https://graphviz-web-vvxsiayuzq-ue.a.run.app/tslsynth", {tsl: tslSpec, target: targetLang}, function(data){
document.getElementById("codeBox").value = data;
});
})
.fail(function(response) {
document.getElementById("codeBox").value = response.responseText;
});

}

</script>
Expand Down

0 comments on commit 93a3c25

Please sign in to comment.