Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Node.js e Google Cloud Platform

Paulo Pires
November 22, 2014

Node.js e Google Cloud Platform

Paulo Pires

November 22, 2014
Tweet

More Decks by Paulo Pires

Other Decks in Technology

Transcript

  1. 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');
  2. package.json { "name": "quickstart", "description": "Appengine node.js project", "version": "0.0.1",

    "dependencies": { "express": "4.x", "appengine" : "git://github.com/GoogleCloudPlatfor appengine-nodejs.git" } }
  3. $ gcloud preview app run . $ gcloud --verbosity debug

    preview app run . $ gcloud --project YOUR-PROJECT preview app deploy . deploy