以下の内容はhttps://uga-box.hatenablog.com/entry/2022/02/03/000000より取得しました。


【Cloud Functions】Functionをローカルで試したい

Cloud Functionsで外部APIで取得したデータをGCSに定期的に保存することをやったが、これをローカルで試したい uga-box.hatenablog.com

調べたらGCPチームがだしているこのライブラリがよさそう

github.com

インストールして

npm install @google-cloud/functions-framework

package.json内に目的の関数をオプションに渡して起動するscriptをつくって

  "scripts": {
    "start": "functions-framework --target=helloWorld"
  }

サーバーを起動する

pm start
...
Serving function...
Function: helloWorld
URL: http://localhost:8080/

あとはcurlなどでエンドポイントにリクスと送信すると結果が返ってくる

$ curl localhost:8080
# Output: Hello, World



以上の内容はhttps://uga-box.hatenablog.com/entry/2022/02/03/000000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14