Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify app.yaml files, reduce # of e2e tests, and cleanup for webpa… #40

Merged
merged 1 commit into from
Nov 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions appengine/express-memcached-session/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
runtime: nodejs
vm: true
env_variables:
PORT: 8080
MEMCACHE_URL: localhost:11211
MEMCACHE_URL: localhost:11211
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Is this finally defaulted in the base runtime?

4 changes: 1 addition & 3 deletions appengine/express/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
# [START app_yaml]
runtime: nodejs
vm: true
env_variables:
PORT: 8080
# [END app_yaml]
# [END app_yaml]
4 changes: 1 addition & 3 deletions appengine/geddy/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
# [START app_yaml]
runtime: nodejs
vm: true
env_variables:
PORT: 8080
# [END app_yaml]
# [END app_yaml]
4 changes: 1 addition & 3 deletions appengine/grunt/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
# [START app_yaml]
runtime: nodejs
vm: true
env_variables:
PORT: 8080
# [END app_yaml]
# [END app_yaml]
4 changes: 1 addition & 3 deletions appengine/hapi/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
# [START app_yaml]
runtime: nodejs
vm: true
env_variables:
PORT: 8080
# [END app_yaml]
# [END app_yaml]
4 changes: 1 addition & 3 deletions appengine/koa/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
# [START app_yaml]
runtime: nodejs
vm: true
env_variables:
PORT: 8080
# [END app_yaml]
# [END app_yaml]
4 changes: 1 addition & 3 deletions appengine/kraken/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
# [START app_yaml]
runtime: nodejs
vm: true
env_variables:
PORT: 8080
# [END app_yaml]
# [END app_yaml]
4 changes: 1 addition & 3 deletions appengine/loopback/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
# [START app_yaml]
runtime: nodejs
vm: true
env_variables:
PORT: 8080
# [END app_yaml]
# [END app_yaml]
3 changes: 1 addition & 2 deletions appengine/mailgun/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@
runtime: nodejs
vm: true
env_variables:
PORT: 8080
MAILGUN_API_KEY: <your-mailgun-api-key>
# [END app_yaml]
# [END app_yaml]
4 changes: 1 addition & 3 deletions appengine/mongo/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
# [START app_yaml]
runtime: nodejs
vm: true
env_variables:
PORT: 8080
# [END app_yaml]
# [END app_yaml]
4 changes: 1 addition & 3 deletions appengine/redis/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
# [START app_yaml]
runtime: nodejs
vm: true
env_variables:
PORT: 8080
# [END app_yaml]
# [END app_yaml]
4 changes: 1 addition & 3 deletions appengine/restify/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
# [START app_yaml]
runtime: nodejs
vm: true
env_variables:
PORT: 8080
# [END app_yaml]
# [END app_yaml]
4 changes: 1 addition & 3 deletions appengine/sails/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
# [START app_yaml]
runtime: nodejs
vm: true
env_variables:
PORT: 8080
# [END app_yaml]
# [END app_yaml]
3 changes: 3 additions & 0 deletions appengine/webpack/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
2 changes: 2 additions & 0 deletions appengine/webpack/public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 2 additions & 0 deletions appengine/webpack/public/foo.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

'use strict';

// [START module]
module.exports = {
name: 'foo'
};
// [END module]
1 change: 0 additions & 1 deletion appengine/webpack/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
'use strict';

var express = require('express');
var path = require('path');

var app = express();

Expand Down
15 changes: 15 additions & 0 deletions appengine/webpack/webpack.config.js
Original file line number Diff line number Diff line change
@@ -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]
25 changes: 6 additions & 19 deletions test/appengine/all.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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 <span>foo</span> via Webpack.'
Expand All @@ -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
});
}

Expand Down