diff --git a/Dockerfile b/Dockerfile index 51f2d8f8..9d3f3742 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ FROM golang:latest AS binarybuilder WORKDIR /go/src/github.com/usefathom/fathom COPY . /go/src/github.com/usefathom/fathom COPY --from=assetbuilder /app/assets/build ./assets/build -RUN go get -u github.com/gobuffalo/packr/... && make docker +RUN make docker FROM alpine:latest EXPOSE 8080 diff --git a/assets/src/js/lib/client.js b/assets/src/js/lib/client.js index 41ded341..fe324c4b 100644 --- a/assets/src/js/lib/client.js +++ b/assets/src/js/lib/client.js @@ -22,7 +22,7 @@ Client.request = function(url, args) { // trim leading slash from URL url = (url[0] === '/') ? url.substring(1) : url; - return window.fetch(`/api/${url}`, args) + return window.fetch(`api/${url}`, args) .then(handleRequestErrors) .then(parseJSON) .then(parseData) diff --git a/package-lock.json b/package-lock.json index e42fbe7d..a2e6cef6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2951,12 +2951,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2971,17 +2973,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -3098,7 +3103,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -3110,6 +3116,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3124,6 +3131,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -3131,12 +3139,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -3155,6 +3165,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -3235,7 +3246,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -3247,6 +3259,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3368,6 +3381,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",