File tree Expand file tree Collapse file tree 1 file changed +45
-1
lines changed Expand file tree Collapse file tree 1 file changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,52 @@ The `cdk.json` file tells the CDK Toolkit how to execute your app.
12
12
* ` npx cdk diff ` compare deployed stack with current state
13
13
* ` npx cdk synth ` emits the synthesized CloudFormation template
14
14
15
- ## Deploy the stack on AWS
15
+ ## Routes
16
+
17
+ ### /transcode
18
+ ``` js
19
+ const res = await fetch (' https://n2klthh2tl.execute-api.us-east-1.amazonaws.com/prod/transcode' , {
20
+ method: ' POST' ,
21
+ body: JSON .stringify ({
22
+ url: " https://pub-951fa3482dca41f6bf9fa25a7953175d.r2.dev/ytaudio.webm" ,
23
+ requestId: " XXXXXXXXXXXXXXXX"
24
+ }),
25
+ headers: {
26
+ ' Content-Type' : ' application/json'
27
+ }
28
+ })
29
+ const data = await res .json ()
30
+ console .log (data)
31
+ // {
32
+ // success: true,
33
+ // requestId: 'XXXXXXXXXXXXXXXX',
34
+ // url: 'https://audioprocessingstack-s3100bedfb-ihhtoldoybzj.s3.us-east-1.amazonaws.com/ffmpeg/temp/3f4775f7dfdada3f/f4775f7dfdada3f8.ogg'
35
+ // }
36
+ ```
16
37
38
+ ### /concat
39
+ ``` js
40
+ const res = await fetch (' https://n2klthh2tl.execute-api.us-east-1.amazonaws.com/prod/concat' , {
41
+ method: ' POST' ,
42
+ body: JSON .stringify ({
43
+ urls: [" https://pub-951fa3482dca41f6bf9fa25a7953175d.r2.dev/ytaudio.webm" , " https://pub-951fa3482dca41f6bf9fa25a7953175d.r2.dev/ytaudio.webm" ],
44
+ requestId: " XXXXXXXXXXXXXXXX"
45
+ }),
46
+ headers: {
47
+ ' Content-Type' : ' application/json'
48
+ }
49
+ })
50
+ const data = await res .json ()
51
+ console .log (data)
52
+ // {
53
+ // success: true,
54
+ // requestId: 'XXXXXXXXXXXXXXXX',
55
+ // url: 'https://audioprocessingstack-s3100bedfb-ihhtoldoybzj.s3.us-east-1.amazonaws.com/ffmpeg/temp/3f4775f7dfdada3f/f4775f7dfdada3f8.ogg'
56
+ // }
57
+ ```
58
+
59
+
60
+ ## Deploy the stack on AWS
17
61
18
62
### Configure IAM
19
63
You can’t perform that action at this time.
0 commit comments