Fix api endpoint and EXPOSE in Dockerfile
This commit is contained in:
parent
fbb85567e8
commit
91c42a6867
4 changed files with 21 additions and 21 deletions
|
@ -14,4 +14,4 @@ WORKDIR /src/yt-dls-backend
|
|||
RUN go build -o yt-dls-backend *.go
|
||||
ENTRYPOINT ["/src/yt-dls-backend/yt-dls-backend"]
|
||||
|
||||
EXPOSE 3000
|
||||
EXPOSE 8080
|
||||
|
|
|
@ -926,7 +926,7 @@ var app = (function () {
|
|||
p = element("p");
|
||||
t = text(t_value);
|
||||
set_style(p, "color", "red");
|
||||
add_location(p, file$2, 58, 2, 1610);
|
||||
add_location(p, file$2, 58, 2, 1631);
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, p, anchor);
|
||||
|
@ -989,22 +989,22 @@ var app = (function () {
|
|||
t5 = text(/*url*/ ctx[0]);
|
||||
t6 = space();
|
||||
img = element("img");
|
||||
add_location(h5, file$2, 48, 49, 1219);
|
||||
add_location(h5, file$2, 48, 49, 1240);
|
||||
attr_dev(div0, "class", "pb-2 flex-grow-1 bd-highlight");
|
||||
add_location(div0, file$2, 48, 6, 1176);
|
||||
add_location(small0, file$2, 49, 42, 1295);
|
||||
add_location(div0, file$2, 48, 6, 1197);
|
||||
add_location(small0, file$2, 49, 42, 1316);
|
||||
attr_dev(div1, "class", "pb-2 px-2 bd-highlight");
|
||||
add_location(div1, file$2, 49, 6, 1259);
|
||||
add_location(div1, file$2, 49, 6, 1280);
|
||||
attr_dev(div2, "class", "d-flex bd-highlight");
|
||||
add_location(div2, file$2, 47, 4, 1136);
|
||||
add_location(small1, file$2, 54, 7, 1517);
|
||||
add_location(p, file$2, 54, 4, 1514);
|
||||
add_location(div2, file$2, 47, 4, 1157);
|
||||
add_location(small1, file$2, 54, 7, 1538);
|
||||
add_location(p, file$2, 54, 4, 1535);
|
||||
if (!src_url_equal(img.src, img_src_value = /*video_info*/ ctx[3].Thumbnails[0].URL)) attr_dev(img, "src", img_src_value);
|
||||
add_location(img, file$2, 55, 4, 1546);
|
||||
add_location(img, file$2, 55, 4, 1567);
|
||||
attr_dev(a, "href", /*download_path*/ ctx[2]);
|
||||
attr_dev(a, "class", "list-group-item list-group-item-action");
|
||||
attr_dev(a, "aria-current", "true");
|
||||
add_location(a, file$2, 46, 2, 1040);
|
||||
add_location(a, file$2, 46, 2, 1061);
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, a, anchor);
|
||||
|
@ -1075,9 +1075,9 @@ var app = (function () {
|
|||
span = element("span");
|
||||
t = text(t_value);
|
||||
attr_dev(span, "class", span_class_value = /*statusBadge*/ ctx[4][/*status*/ ctx[1].Status].class);
|
||||
add_location(span, file$2, 51, 37, 1393);
|
||||
add_location(span, file$2, 51, 37, 1414);
|
||||
attr_dev(div, "class", "pb-2 px-2 bd-highlight");
|
||||
add_location(div, file$2, 51, 1, 1357);
|
||||
add_location(div, file$2, 51, 1, 1378);
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, div, anchor);
|
||||
|
@ -1115,7 +1115,7 @@ var app = (function () {
|
|||
c: function create() {
|
||||
p = element("p");
|
||||
p.textContent = "waiting...";
|
||||
add_location(p, file$2, 44, 2, 1001);
|
||||
add_location(p, file$2, 44, 2, 1022);
|
||||
},
|
||||
m: function mount(target, anchor) {
|
||||
insert_dev(target, p, anchor);
|
||||
|
@ -1218,7 +1218,7 @@ var app = (function () {
|
|||
let download_path = "#";
|
||||
|
||||
async function startDownload() {
|
||||
const res = await fetch(`http://yt-dls-backend:8080/download?url=${url}`);
|
||||
const res = await fetch(`https://yt-dls-api.andreafazzi.eu/download?url=${url}`);
|
||||
$$invalidate(3, video_info = await res.json());
|
||||
|
||||
if (res.ok) {
|
||||
|
@ -1229,12 +1229,12 @@ var app = (function () {
|
|||
}
|
||||
|
||||
async function getStatus() {
|
||||
const res = await fetch(`http://yt-dls-backend:8080/status?url=${url}`);
|
||||
const res = await fetch(`https://yt-dls-api.andreafazzi.eu/status?url=${url}`);
|
||||
$$invalidate(1, status = await res.json());
|
||||
|
||||
if (res.ok) {
|
||||
if (status.DownloadPath) {
|
||||
$$invalidate(2, download_path = `http://yt-dls-backend:8080/${status.DownloadPath}`);
|
||||
$$invalidate(2, download_path = `https://yt-dls-api.andreafazzi.eu/${status.DownloadPath}`);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -11,7 +11,7 @@
|
|||
let download_path = "#";
|
||||
|
||||
async function startDownload() {
|
||||
const res = await fetch(`http://yt-dls-backend:8080/download?url=${url}`);
|
||||
const res = await fetch(`https://yt-dls-api.andreafazzi.eu/download?url=${url}`);
|
||||
video_info = await res.json();
|
||||
|
||||
if (res.ok) {
|
||||
|
@ -23,12 +23,12 @@
|
|||
}
|
||||
|
||||
async function getStatus() {
|
||||
const res = await fetch(`http://yt-dls-backend:8080/status?url=${url}`);
|
||||
const res = await fetch(`https://yt-dls-api.andreafazzi.eu/status?url=${url}`);
|
||||
status = await res.json();
|
||||
|
||||
if (res.ok) {
|
||||
if (status.DownloadPath) {
|
||||
download_path = `http://yt-dls-backend:8080/${status.DownloadPath}`;
|
||||
download_path = `https://yt-dls-api.andreafazzi.eu/${status.DownloadPath}`;
|
||||
}
|
||||
return status;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue