Setting up standalone/client/server run scripts
This commit is contained in:
@@ -78,6 +78,10 @@
|
|||||||
<artifactId>jetty-maven-plugin</artifactId>
|
<artifactId>jetty-maven-plugin</artifactId>
|
||||||
<version>${jetty.version}</version>
|
<version>${jetty.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<scan>0</scan>
|
||||||
|
<httpConnector>
|
||||||
|
<port>8085</port>
|
||||||
|
</httpConnector>
|
||||||
<webApp>
|
<webApp>
|
||||||
<contextPath>/api/</contextPath>
|
<contextPath>/api/</contextPath>
|
||||||
</webApp>
|
</webApp>
|
||||||
|
5
client.sh
Executable file
5
client.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:5006"
|
||||||
|
#mvn --projects view-webapp -Dpairgoth.api.url=http://localhost:8085/api/ package jetty:run-war
|
||||||
|
mvn --projects view-webapp package jetty:run-war
|
3
debug.sh
3
debug.sh
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
mvn package && java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5006 -jar application/target/pairgoth-engine.jar
|
|
3
run.sh
3
run.sh
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
mvn package && java -jar application/target/pairgoth-engine.jar
|
|
4
server.sh
Executable file
4
server.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:5005"
|
||||||
|
mvn --projects api-webapp package jetty:run-war
|
6
standalone.sh
Executable file
6
standalone.sh
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# debug version
|
||||||
|
# mvn package && java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5006 -jar application/target/pairgoth-engine.jar
|
||||||
|
|
||||||
|
mvn package && java -jar application/target/pairgoth-engine.jar
|
3
view-webapp/csswatch.sh
Executable file
3
view-webapp/csswatch.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
mvn com.gitlab.haynes:libsass-maven-plugin:0.2.29:watch
|
@@ -101,11 +101,11 @@
|
|||||||
<version>${jetty.version}</version>
|
<version>${jetty.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<scan>0</scan>
|
<scan>0</scan>
|
||||||
|
<httpConnector>
|
||||||
|
<port>8080</port>
|
||||||
|
</httpConnector>
|
||||||
<systemProperties>
|
<systemProperties>
|
||||||
<systemProperty>
|
<pairgoth.api.url>http://localhost:8085/api/</pairgoth.api.url>
|
||||||
<name>pairgoth.webapp.url</name>
|
|
||||||
<value>http://localhost:8080</value>
|
|
||||||
</systemProperty>
|
|
||||||
</systemProperties>
|
</systemProperties>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# webapp
|
# webapp
|
||||||
env = dev
|
env = dev
|
||||||
webapp.url = https://localhost:8080
|
webapp.url = https://localhost:8080
|
||||||
api.url = https://localhost:8085
|
api.url = https://localhost:8085/api
|
||||||
|
|
||||||
# store
|
# store
|
||||||
store = file
|
store = file
|
||||||
|
@@ -11,11 +11,9 @@ class ApiTool {
|
|||||||
companion object {
|
companion object {
|
||||||
const val JSON = "application/json"
|
const val JSON = "application/json"
|
||||||
val apiRoot =
|
val apiRoot =
|
||||||
(System.getProperty("pairgoth.api.url") ?: System.getProperty("pairgoth.webapp.url"))
|
System.getProperty("pairgoth.api.url")?.let { "${it.removeSuffix("/")}/" }
|
||||||
.let { base ->
|
?: System.getProperty("pairgoth.webapp.url")?.let { "${it.removeSuffix("/")}/api/" }
|
||||||
if (base.endsWith('/')) "${base}api/"
|
?: throw Error("no configured API url")
|
||||||
else "${base}/api/"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private val client = OkHttpClient()
|
private val client = OkHttpClient()
|
||||||
private fun prepare(url: String) = Request.Builder().url("$apiRoot$url").header("Accept", JSON)
|
private fun prepare(url: String) = Request.Builder().url("$apiRoot$url").header("Accept", JSON)
|
||||||
|
Reference in New Issue
Block a user