@ossy/deployment-tools 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/src/caddy-client.js +2 -2
package/dist/index.js
CHANGED
|
@@ -28476,12 +28476,12 @@ class CaddyClient {
|
|
|
28476
28476
|
this.serverName = serverName
|
|
28477
28477
|
}
|
|
28478
28478
|
|
|
28479
|
-
deploy({ domain,
|
|
28479
|
+
deploy({ domain, targetPort }) {
|
|
28480
28480
|
return fetch(`http://localhost:2019/config/apps/http/servers/${this.serverName}/routes`, {
|
|
28481
28481
|
method: 'POST',
|
|
28482
28482
|
headers: { 'Content-Type': 'application/json' },
|
|
28483
28483
|
body: JSON.stringify({
|
|
28484
|
-
match: [Matchers.host(`*.${
|
|
28484
|
+
match: [Matchers.host(`*.${domain}`)],
|
|
28485
28485
|
handle: [
|
|
28486
28486
|
Handlers.subroute([{ handle: [Handlers.reverseProxy(targetPort)] }])
|
|
28487
28487
|
],
|
package/package.json
CHANGED
package/src/caddy-client.js
CHANGED
|
@@ -80,12 +80,12 @@ class CaddyClient {
|
|
|
80
80
|
this.serverName = serverName
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
deploy({ domain,
|
|
83
|
+
deploy({ domain, targetPort }) {
|
|
84
84
|
return fetch(`http://localhost:2019/config/apps/http/servers/${this.serverName}/routes`, {
|
|
85
85
|
method: 'POST',
|
|
86
86
|
headers: { 'Content-Type': 'application/json' },
|
|
87
87
|
body: JSON.stringify({
|
|
88
|
-
match: [Matchers.host(`*.${
|
|
88
|
+
match: [Matchers.host(`*.${domain}`)],
|
|
89
89
|
handle: [
|
|
90
90
|
Handlers.subroute([{ handle: [Handlers.reverseProxy(targetPort)] }])
|
|
91
91
|
],
|