Last active
May 20, 2019 02:06
-
-
Save flatfisher/40e2f97dbc3ff830dd55f6274b0614e6 to your computer and use it in GitHub Desktop.
TypeScript で Google Cloud Functions やりたい人向けのテンプレートをつくった ref: https://qiita.com/flatfisher/items/c3656c13d01503e9c501
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm install -g mocha // mochaがインストールされていればスキップ | |
$ npm run test | |
Hello function | |
✓ Get 200 response | |
1 passing (31ms) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm run deploy --prefix functions/src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl https://asia-northeast1-foo.cloudfunctions.net/helloWorld | |
$ Hello World |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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