Node.js samples for Google Cloud Platform products.
See cloud.google.com/nodejs to get up and running with Node.js on Google Cloud Platform.
To browse documentation pages that use the samples found in this repository, visit the Google Cloud Samples page.
Setup
-
Install Node.js version 14 or greater
-
Install the Google Cloud CLI (gcloud)
-
Clone this repository
-
Obtain authentication credentials.
Create local credentials by running the following command and following the oauth2 flow (read more about the command here):
gcloud auth application-default loginRead more about Google Cloud Platform Authentication.
検証
Cloud Run のデプロイ
- プロジェクトを選択する
gcloud config set project xxx
gcloud config get-value project
デプロイを実行する
cd run/helloworld
npm install
./deploy.sh
PubSub
gcloud auth application-default login
cd pubsub/publish
npm install
npm start