- Create the project from the following template:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch11/gcp --path cncb-gcp
- Navigate to the cncb-gcp directory with cd cncb-gcp.
- Review the file named serverless.yml with the following content:
service: cncb-gcpprovider: name: google runtime: nodejs8 project: cncb-project region: ${opt:region} credentials: ~/.gcloud/keyfile.jsonplugins: - serverless-google-cloudfunctionsfunctions: hello: handler: hello events: - http: path...#resources:# resources:# - type: storage.v1.bucket# name: my-serverless-service-bucket
- Review the file named index.js with the following content:
exports.hello = (request, response) => { console.log('env: %j', ...