質問編集履歴

3

追記

2019/09/03 17:12

投稿

Rommy
Rommy

スコア5

test CHANGED
File without changes
test CHANGED
@@ -40,6 +40,54 @@
40
40
 
41
41
 
42
42
 
43
+ ※使用したコード
44
+
45
+ 『https://qiita.com/miso_develop/items/bdcf15489b069ba1fa61』
46
+
47
+ ```
48
+
49
+ const config = {
50
+
51
+ restApiId: "xxxxxxxx",
52
+
53
+ resourceId: "xxxxxxxx",
54
+
55
+ httpMethod: "ANY",
56
+
57
+ port: 3000,
58
+
59
+ }
60
+
61
+
62
+
63
+ const execSync = require('child_process').execSync
64
+
65
+ const ngrok = require('ngrok')
66
+
67
+
68
+
69
+ const main = async () => {
70
+
71
+ const ngrokUrl = await ngrok.connect(config.port)
72
+
73
+ console.log(ngrokUrl)
74
+
75
+
76
+
77
+ execSync(`aws apigateway put-integration --rest-api-id ${config.restApiId} --resource-id ${config.resourceId} --http-method ${config.httpMethod} --type HTTP_PROXY --integration-http-method ${config.httpMethod} --uri ${ngrokUrl}`)
78
+
79
+ execSync(`aws apigateway create-deployment --rest-api-id ${config.restApiId} --stage-name prod`)
80
+
81
+ console.log(`https://${config.restApiId}.execute-api.ap-northeast-1.amazonaws.com/prod`)
82
+
83
+ }
84
+
85
+ main()
86
+
87
+ ```
88
+
89
+
90
+
43
91
  ※試したこと(覚えている限り)
44
92
 
45
93
  ```

2

追記

2019/09/03 17:11

投稿

Rommy
Rommy

スコア5

test CHANGED
File without changes
test CHANGED
@@ -40,7 +40,7 @@
40
40
 
41
41
 
42
42
 
43
- ※試したこと
43
+ ※試したこと(覚えている限り)
44
44
 
45
45
  ```
46
46
 

1

追記

2019/09/02 21:58

投稿

Rommy
Rommy

スコア5

test CHANGED
File without changes
test CHANGED
@@ -37,3 +37,25 @@
37
37
  解決策をご存知の方いらっしゃれば教えて頂けると嬉しいです。
38
38
 
39
39
  よろしくおねがいします
40
+
41
+
42
+
43
+ ※試したこと
44
+
45
+ ```
46
+
47
+ npm install -g npm-install-missing
48
+
49
+ ```
50
+
51
+ ```
52
+
53
+ npm install googleapis@39 --save
54
+
55
+ ```
56
+
57
+ ```
58
+
59
+ npm install commander@2.9
60
+
61
+ ```