diff --git a/appengine/express-memcached-session/app.yaml b/appengine/express-memcached-session/app.yaml index 74bdf41675..7f6ff65c91 100644 --- a/appengine/express-memcached-session/app.yaml +++ b/appengine/express-memcached-session/app.yaml @@ -14,5 +14,4 @@ runtime: nodejs vm: true env_variables: - PORT: 8080 - MEMCACHE_URL: localhost:11211 \ No newline at end of file + MEMCACHE_URL: localhost:11211 diff --git a/appengine/express/app.yaml b/appengine/express/app.yaml index 7176b385a4..70563937a1 100644 --- a/appengine/express/app.yaml +++ b/appengine/express/app.yaml @@ -14,6 +14,4 @@ # [START app_yaml] runtime: nodejs vm: true -env_variables: - PORT: 8080 -# [END app_yaml] \ No newline at end of file +# [END app_yaml] diff --git a/appengine/geddy/app.yaml b/appengine/geddy/app.yaml index 7176b385a4..70563937a1 100644 --- a/appengine/geddy/app.yaml +++ b/appengine/geddy/app.yaml @@ -14,6 +14,4 @@ # [START app_yaml] runtime: nodejs vm: true -env_variables: - PORT: 8080 -# [END app_yaml] \ No newline at end of file +# [END app_yaml] diff --git a/appengine/grunt/app.yaml b/appengine/grunt/app.yaml index 7176b385a4..70563937a1 100644 --- a/appengine/grunt/app.yaml +++ b/appengine/grunt/app.yaml @@ -14,6 +14,4 @@ # [START app_yaml] runtime: nodejs vm: true -env_variables: - PORT: 8080 -# [END app_yaml] \ No newline at end of file +# [END app_yaml] diff --git a/appengine/hapi/app.yaml b/appengine/hapi/app.yaml index 7176b385a4..70563937a1 100644 --- a/appengine/hapi/app.yaml +++ b/appengine/hapi/app.yaml @@ -14,6 +14,4 @@ # [START app_yaml] runtime: nodejs vm: true -env_variables: - PORT: 8080 -# [END app_yaml] \ No newline at end of file +# [END app_yaml] diff --git a/appengine/koa/app.yaml b/appengine/koa/app.yaml index 7176b385a4..70563937a1 100644 --- a/appengine/koa/app.yaml +++ b/appengine/koa/app.yaml @@ -14,6 +14,4 @@ # [START app_yaml] runtime: nodejs vm: true -env_variables: - PORT: 8080 -# [END app_yaml] \ No newline at end of file +# [END app_yaml] diff --git a/appengine/kraken/app.yaml b/appengine/kraken/app.yaml index 7176b385a4..70563937a1 100644 --- a/appengine/kraken/app.yaml +++ b/appengine/kraken/app.yaml @@ -14,6 +14,4 @@ # [START app_yaml] runtime: nodejs vm: true -env_variables: - PORT: 8080 -# [END app_yaml] \ No newline at end of file +# [END app_yaml] diff --git a/appengine/loopback/app.yaml b/appengine/loopback/app.yaml index 7176b385a4..70563937a1 100644 --- a/appengine/loopback/app.yaml +++ b/appengine/loopback/app.yaml @@ -14,6 +14,4 @@ # [START app_yaml] runtime: nodejs vm: true -env_variables: - PORT: 8080 -# [END app_yaml] \ No newline at end of file +# [END app_yaml] diff --git a/appengine/mailgun/app.yaml b/appengine/mailgun/app.yaml index 4f89c8e7de..85dacb9404 100644 --- a/appengine/mailgun/app.yaml +++ b/appengine/mailgun/app.yaml @@ -15,6 +15,5 @@ runtime: nodejs vm: true env_variables: - PORT: 8080 MAILGUN_API_KEY: -# [END app_yaml] \ No newline at end of file +# [END app_yaml] diff --git a/appengine/mongo/app.yaml b/appengine/mongo/app.yaml index 7176b385a4..70563937a1 100644 --- a/appengine/mongo/app.yaml +++ b/appengine/mongo/app.yaml @@ -14,6 +14,4 @@ # [START app_yaml] runtime: nodejs vm: true -env_variables: - PORT: 8080 -# [END app_yaml] \ No newline at end of file +# [END app_yaml] diff --git a/appengine/redis/app.yaml b/appengine/redis/app.yaml index 7176b385a4..70563937a1 100644 --- a/appengine/redis/app.yaml +++ b/appengine/redis/app.yaml @@ -14,6 +14,4 @@ # [START app_yaml] runtime: nodejs vm: true -env_variables: - PORT: 8080 -# [END app_yaml] \ No newline at end of file +# [END app_yaml] diff --git a/appengine/restify/app.yaml b/appengine/restify/app.yaml index 7176b385a4..70563937a1 100644 --- a/appengine/restify/app.yaml +++ b/appengine/restify/app.yaml @@ -14,6 +14,4 @@ # [START app_yaml] runtime: nodejs vm: true -env_variables: - PORT: 8080 -# [END app_yaml] \ No newline at end of file +# [END app_yaml] diff --git a/appengine/sails/app.yaml b/appengine/sails/app.yaml index 7176b385a4..70563937a1 100644 --- a/appengine/sails/app.yaml +++ b/appengine/sails/app.yaml @@ -14,6 +14,4 @@ # [START app_yaml] runtime: nodejs vm: true -env_variables: - PORT: 8080 -# [END app_yaml] \ No newline at end of file +# [END app_yaml] diff --git a/appengine/webpack/app.yaml b/appengine/webpack/app.yaml index 03acf33b16..70563937a1 100644 --- a/appengine/webpack/app.yaml +++ b/appengine/webpack/app.yaml @@ -10,5 +10,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# +# [START app_yaml] runtime: nodejs vm: true +# [END app_yaml] diff --git a/appengine/webpack/public/app.js b/appengine/webpack/public/app.js index 2e1be7a44e..a4a46114e8 100644 --- a/appengine/webpack/public/app.js +++ b/appengine/webpack/public/app.js @@ -14,6 +14,8 @@ /* global document:true */ 'use strict'; +// [START load_module] var foo = require('./foo.js'); +// [END load_module] document.getElementById('module-name').innerText = foo.name; diff --git a/appengine/webpack/public/foo.js b/appengine/webpack/public/foo.js index dcba093f4c..884eb957d5 100644 --- a/appengine/webpack/public/foo.js +++ b/appengine/webpack/public/foo.js @@ -13,6 +13,8 @@ 'use strict'; +// [START module] module.exports = { name: 'foo' }; +// [END module] diff --git a/appengine/webpack/server.js b/appengine/webpack/server.js index affb6b4aaf..85f252f320 100644 --- a/appengine/webpack/server.js +++ b/appengine/webpack/server.js @@ -14,7 +14,6 @@ 'use strict'; var express = require('express'); -var path = require('path'); var app = express(); diff --git a/appengine/webpack/webpack.config.js b/appengine/webpack/webpack.config.js index f45f55d69d..4ce719f184 100644 --- a/appengine/webpack/webpack.config.js +++ b/appengine/webpack/webpack.config.js @@ -1,6 +1,21 @@ +// Copyright 2015, Google, Inc. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// [START webpack] module.exports = { entry: './public/app.js', output: { filename: './dist/app.js' } }; +// [END webpack] diff --git a/test/appengine/all.test.js b/test/appengine/all.test.js index c458e86fde..7f27e3e2e3 100644 --- a/test/appengine/all.test.js +++ b/test/appengine/all.test.js @@ -43,11 +43,9 @@ var sampleTests = [ }, { dir: 'geddy', - deploy: true, cmd: 'node', args: ['node_modules/geddy/bin/cli.js'], - msg: 'Hello, World! Geddy.js on Google App Engine.', - TRAVIS_NODE_VERSION: '0.10' + msg: 'Hello, World! Geddy.js on Google App Engine.' }, { dir: 'grunt', @@ -59,29 +57,23 @@ var sampleTests = [ }, { dir: 'hapi', - deploy: true, cmd: 'node', args: ['index.js'], - msg: 'Hello World! Hapi.js on Google App Engine.', - TRAVIS_NODE_VERSION: '0.12' + msg: 'Hello World! Hapi.js on Google App Engine.' }, { dir: 'kraken', - deploy: true, cmd: 'node', args: ['server.js'], msg: 'Hello World! Kraken.js on Google App Engine.', - code: 304, - TRAVIS_NODE_VERSION: '0.12' + code: 304 }, { dir: 'loopback', - deploy: true, cmd: 'node', args: ['server/server.js'], msg: 'LoopBack.js on Google App Engine.', - code: 304, - TRAVIS_NODE_VERSION: 'stable' + code: 304 }, { dir: 'mailgun', @@ -97,15 +89,12 @@ var sampleTests = [ }, { dir: 'restify', - deploy: true, cmd: 'node', args: ['server.js'], - msg: 'Hello World! Restify.js on Google App Engine.', - TRAVIS_NODE_VERSION: 'stable' + msg: 'Hello World! Restify.js on Google App Engine.' }, { dir: 'webpack', - deploy: false, cmd: 'node', args: ['server.js'], msg: 'Loaded module foo via Webpack.' @@ -117,12 +106,10 @@ if (process.env.TRAVIS_NODE_VERSION === '0.10') { // Travis when using Node.js stable. It works locally, however. sampleTests.push({ dir: 'sails', - deploy: true, cmd: 'node', args: ['app.js'], msg: 'Hello World! Sails.js on Google App Engine.', - timeout: 240000, - TRAVIS_NODE_VERSION: '0.10' + timeout: 240000 }); }