Download - Node.js and Google Cloud
![Page 1: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/1.jpg)
javascript and google cloud
![Page 2: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/2.jpg)
Paulo Pires paulopires.me
![Page 3: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/3.jpg)
how google cloud work?
![Page 4: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/4.jpg)
![Page 5: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/5.jpg)
PaaS
![Page 6: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/6.jpg)
go python php java custom runtimes
![Page 7: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/7.jpg)
custom runtimes
![Page 8: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/8.jpg)
![Page 9: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/9.jpg)
you need 4 files
![Page 10: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/10.jpg)
app.yaml Dockerfile server.js package.json
![Page 11: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/11.jpg)
app.yaml
version: 1 runtime: custom vm: true api_version: 1
manual_scaling: instances: 1
handlers: ...
![Page 12: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/12.jpg)
Dockerfile
FROM google/nodejs-runtime
![Page 13: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/13.jpg)
server.js var appengine = require('appengine'); var express = require('express');
var app = express();
app.use(appengine.middleware.base);
app.get('/_ah/health', function(req, res) { res.set('Content-Type', 'text/plain'); res.send(200, 'ok'); }); app.listen(8080, '0.0.0.0'); console.log('Listening on port 8080');
![Page 14: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/14.jpg)
package.json { "name": "quickstart", "description": "Appengine node.js project", "version": "0.0.1", "dependencies": { "express": "4.x", "appengine" : "git://github.com/GoogleCloudPlatform/appengine-nodejs.git" } }
![Page 15: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/15.jpg)
♥
![Page 16: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/16.jpg)
$ gcloud preview app run . $ gcloud --verbosity debug preview app run . $ gcloud --project YOUR-PROJECT preview app deploy .
deploy
![Page 17: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/17.jpg)
♥
![Page 18: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/18.jpg)
we have other option
![Page 19: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/19.jpg)
![Page 20: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/20.jpg)
IaaS
![Page 21: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/21.jpg)
storage compute dns api's big query
![Page 22: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/22.jpg)
to use with node.js
bit.ly/node-google
![Page 23: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/23.jpg)
♥
![Page 24: Node.js and Google Cloud](https://reader031.vdocuments.us/reader031/viewer/2022020306/559446101a28ab02738b4604/html5/thumbnails/24.jpg)
vlw♥