Skip to content

Commit 1801dae

Browse files
committed
Merge pull request #40 from GoogleCloudPlatform/simplify
Simplify app.yaml files, reduce # of e2e tests, and cleanup for webpa…
2 parents 9e0d3d8 + bf9f5d8 commit 1801dae

File tree

19 files changed

+41
-57
lines changed

19 files changed

+41
-57
lines changed

appengine/express-memcached-session/app.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@
1414
runtime: nodejs
1515
vm: true
1616
env_variables:
17-
PORT: 8080
18-
MEMCACHE_URL: localhost:11211
17+
MEMCACHE_URL: localhost:11211

appengine/express/app.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@
1414
# [START app_yaml]
1515
runtime: nodejs
1616
vm: true
17-
env_variables:
18-
PORT: 8080
19-
# [END app_yaml]
17+
# [END app_yaml]

appengine/geddy/app.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@
1414
# [START app_yaml]
1515
runtime: nodejs
1616
vm: true
17-
env_variables:
18-
PORT: 8080
19-
# [END app_yaml]
17+
# [END app_yaml]

appengine/grunt/app.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@
1414
# [START app_yaml]
1515
runtime: nodejs
1616
vm: true
17-
env_variables:
18-
PORT: 8080
19-
# [END app_yaml]
17+
# [END app_yaml]

appengine/hapi/app.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@
1414
# [START app_yaml]
1515
runtime: nodejs
1616
vm: true
17-
env_variables:
18-
PORT: 8080
19-
# [END app_yaml]
17+
# [END app_yaml]

appengine/koa/app.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@
1414
# [START app_yaml]
1515
runtime: nodejs
1616
vm: true
17-
env_variables:
18-
PORT: 8080
19-
# [END app_yaml]
17+
# [END app_yaml]

appengine/kraken/app.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@
1414
# [START app_yaml]
1515
runtime: nodejs
1616
vm: true
17-
env_variables:
18-
PORT: 8080
19-
# [END app_yaml]
17+
# [END app_yaml]

appengine/loopback/app.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@
1414
# [START app_yaml]
1515
runtime: nodejs
1616
vm: true
17-
env_variables:
18-
PORT: 8080
19-
# [END app_yaml]
17+
# [END app_yaml]

appengine/mailgun/app.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@
1515
runtime: nodejs
1616
vm: true
1717
env_variables:
18-
PORT: 8080
1918
MAILGUN_API_KEY: <your-mailgun-api-key>
20-
# [END app_yaml]
19+
# [END app_yaml]

appengine/mongo/app.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@
1414
# [START app_yaml]
1515
runtime: nodejs
1616
vm: true
17-
env_variables:
18-
PORT: 8080
19-
# [END app_yaml]
17+
# [END app_yaml]

appengine/redis/app.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@
1414
# [START app_yaml]
1515
runtime: nodejs
1616
vm: true
17-
env_variables:
18-
PORT: 8080
19-
# [END app_yaml]
17+
# [END app_yaml]

appengine/restify/app.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@
1414
# [START app_yaml]
1515
runtime: nodejs
1616
vm: true
17-
env_variables:
18-
PORT: 8080
19-
# [END app_yaml]
17+
# [END app_yaml]

appengine/sails/app.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@
1414
# [START app_yaml]
1515
runtime: nodejs
1616
vm: true
17-
env_variables:
18-
PORT: 8080
19-
# [END app_yaml]
17+
# [END app_yaml]

appengine/webpack/app.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@
1010
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
13+
#
14+
# [START app_yaml]
1315
runtime: nodejs
1416
vm: true
17+
# [END app_yaml]

appengine/webpack/public/app.js

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
/* global document:true */
1515
'use strict';
1616

17+
// [START load_module]
1718
var foo = require('./foo.js');
19+
// [END load_module]
1820

1921
document.getElementById('module-name').innerText = foo.name;

appengine/webpack/public/foo.js

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
'use strict';
1515

16+
// [START module]
1617
module.exports = {
1718
name: 'foo'
1819
};
20+
// [END module]

appengine/webpack/server.js

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
'use strict';
1515

1616
var express = require('express');
17-
var path = require('path');
1817

1918
var app = express();
2019

appengine/webpack/webpack.config.js

+15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
1+
// Copyright 2015, Google, Inc.
2+
// Licensed under the Apache License, Version 2.0 (the "License");
3+
// you may not use this file except in compliance with the License.
4+
// You may obtain a copy of the License at
5+
//
6+
// http://www.apache.org/licenses/LICENSE-2.0
7+
//
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
14+
// [START webpack]
115
module.exports = {
216
entry: './public/app.js',
317
output: {
418
filename: './dist/app.js'
519
}
620
};
21+
// [END webpack]

test/appengine/all.test.js

+6-19
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@ var sampleTests = [
4343
},
4444
{
4545
dir: 'geddy',
46-
deploy: true,
4746
cmd: 'node',
4847
args: ['node_modules/geddy/bin/cli.js'],
49-
msg: 'Hello, World! Geddy.js on Google App Engine.',
50-
TRAVIS_NODE_VERSION: '0.10'
48+
msg: 'Hello, World! Geddy.js on Google App Engine.'
5149
},
5250
{
5351
dir: 'grunt',
@@ -59,29 +57,23 @@ var sampleTests = [
5957
},
6058
{
6159
dir: 'hapi',
62-
deploy: true,
6360
cmd: 'node',
6461
args: ['index.js'],
65-
msg: 'Hello World! Hapi.js on Google App Engine.',
66-
TRAVIS_NODE_VERSION: '0.12'
62+
msg: 'Hello World! Hapi.js on Google App Engine.'
6763
},
6864
{
6965
dir: 'kraken',
70-
deploy: true,
7166
cmd: 'node',
7267
args: ['server.js'],
7368
msg: 'Hello World! Kraken.js on Google App Engine.',
74-
code: 304,
75-
TRAVIS_NODE_VERSION: '0.12'
69+
code: 304
7670
},
7771
{
7872
dir: 'loopback',
79-
deploy: true,
8073
cmd: 'node',
8174
args: ['server/server.js'],
8275
msg: 'LoopBack.js on Google App Engine.',
83-
code: 304,
84-
TRAVIS_NODE_VERSION: 'stable'
76+
code: 304
8577
},
8678
{
8779
dir: 'mailgun',
@@ -97,15 +89,12 @@ var sampleTests = [
9789
},
9890
{
9991
dir: 'restify',
100-
deploy: true,
10192
cmd: 'node',
10293
args: ['server.js'],
103-
msg: 'Hello World! Restify.js on Google App Engine.',
104-
TRAVIS_NODE_VERSION: 'stable'
94+
msg: 'Hello World! Restify.js on Google App Engine.'
10595
},
10696
{
10797
dir: 'webpack',
108-
deploy: false,
10998
cmd: 'node',
11099
args: ['server.js'],
111100
msg: 'Loaded module <span>foo</span> via Webpack.'
@@ -117,12 +106,10 @@ if (process.env.TRAVIS_NODE_VERSION === '0.10') {
117106
// Travis when using Node.js stable. It works locally, however.
118107
sampleTests.push({
119108
dir: 'sails',
120-
deploy: true,
121109
cmd: 'node',
122110
args: ['app.js'],
123111
msg: 'Hello World! Sails.js on Google App Engine.',
124-
timeout: 240000,
125-
TRAVIS_NODE_VERSION: '0.10'
112+
timeout: 240000
126113
});
127114
}
128115

0 commit comments

Comments
 (0)