Skip to content

Instantly share code, notes, and snippets.

@flatfisher
Last active May 20, 2019 02:06
Show Gist options
  • Save flatfisher/40e2f97dbc3ff830dd55f6274b0614e6 to your computer and use it in GitHub Desktop.
Save flatfisher/40e2f97dbc3ff830dd55f6274b0614e6 to your computer and use it in GitHub Desktop.
TypeScript で Google Cloud Functions やりたい人向けのテンプレートをつくった ref: https://qiita.com/flatfisher/items/c3656c13d01503e9c501
$ npm run lint
$ npm run build
$ npm install -g mocha // mochaがインストールされていればスキップ
$ npm run test
Hello function
✓ Get 200 response
1 passing (31ms)
$ npm run deploy --prefix functions/src/
$ curl https://asia-northeast1-foo.cloudfunctions.net/helloWorld
$ Hello World
"config": {
"function_name": "helloWorld",
"region": "リージョンをいれる 例:asia-northeast1",
"gcp_project": "GCPのプロジェクトIDをいれる",
"runtime": "ランタイムを指定 例:nodejs8"
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment