File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
- const API_ENDPOINT_THUMBNAIL = 'http://localhost:3000/thumbnail' ;
1
+ let port = 3000 ;
2
+ const API_ENDPOINT_THUMBNAIL = `http://localhost:${ port } /thumbnail` ;
2
3
3
- const API_ENDPOINT_THUMBNAIL2 = ' http://localhost:3000 /thumbnail2' ;
4
+ const API_ENDPOINT_THUMBNAIL2 = ` http://localhost:${ port } /thumbnail2` ;
4
5
5
- const API_ENDPOINT_VIDEO = ' http://localhost:3000 /render' ;
6
+ const API_ENDPOINT_VIDEO = ` http://localhost:${ port } /render` ;
6
7
7
8
8
9
@@ -45,7 +46,8 @@ async function renderVideo(files, totalDuration) {
45
46
}
46
47
console . log ( 'renderVideo() payload=' , payload )
47
48
48
- const res = await fetch ( `${ API_ENDPOINT_VIDEO } /${ Math . ceil ( totalDuration ) } ` , {
49
+ //const res = await fetch( `${API_ENDPOINT_VIDEO}/${Math.ceil(totalDuration)}`, {
50
+ const res = await fetch ( `/render/${ Math . ceil ( totalDuration ) } ` , {
49
51
method : 'POST' ,
50
52
body : payload
51
53
} ) ;
You can’t perform that action at this time.
0 commit comments