Skip to content

Commit

Permalink
Adapting to Heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
perty committed Apr 19, 2020
1 parent 047c577 commit 63ae113
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: java -Dserver.port=$PORT $JAVA_OPTS -jar build/libs/agile-games-0.1-all.jar
8 changes: 6 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ elm {
buildDir = file("src/main/resources/static")
sourceDir = file("src/main/elm/src")
executionDir = "src/main/elm"
executable = org.mohme.gradle.Executable.Provided.INSTANCE
executable = org.mohme.gradle.Executable.Download.V_0_19_1.INSTANCE
debug = true
}

Expand Down Expand Up @@ -83,4 +83,8 @@ task cucumber() {
args = [' --strict', '--plugin', 'de.monochromata.cucumber.report.PrettyReports:build/pretty-cucumber', '--glue', 'agile/games', 'src/test/resources']
}
}
}
}

task stage(dependsOn: ['build','elmMake', 'clean'])
elmMake.mustRunAfter clean
build.mustRunAfter elmMake
8 changes: 6 additions & 2 deletions src/main/resources/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@
flags: startingState
}
);
var host = location.hostname + ":" + 8080;
var ws = new WebSocket("ws://" + host + "/ws/tts");
var host = location.hostname + ":" + location.port;
var protocol = "wss:";
if (location.protocol === "http:") {
protocol = "ws:"
}
var ws = new WebSocket(protocol + "//" + host + "/ws/tts");

ws.onmessage = function (message) {
console.log("WebSocketIn");
Expand Down
1 change: 1 addition & 0 deletions system.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java.runtime.version=13

0 comments on commit 63ae113

Please sign in to comment.