-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Merge samples for Flex and Std #590
Merged
michaelawyu
merged 9 commits into
GoogleCloudPlatform:master
from
michaelawyu:app-engine-samples
Apr 11, 2018
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e42d222
Merge samples for Flex and Std
michaelawyu 63f087d
Solve conflicts
michaelawyu ebccfbb
Merge remote-tracking branch 'upstream/master' into app-engine-sample…
michaelawyu 905d597
MInor Fixes
michaelawyu 79fca64
More minor fixes
michaelawyu c0de187
Lint
michaelawyu 787fd0b
Applied requested changes
michaelawyu 63377bc
Merge branch 'master' into app-engine-samples
2fd9d85
Merge branch 'master' into app-engine-samples
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright 2017, 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 app_yaml] | ||
runtime: nodejs8 | ||
|
||
# [START env] | ||
env_variables: | ||
GA_TRACKING_ID: YOUR_TRACKING_ID | ||
# [END env] | ||
# [END app_yaml] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "appengine-analytics", | ||
"description": "Sample for Google Analytics Measurement Protocol on Google App Engine Flexible Environment.", | ||
"description": "Sample for Google Analytics Measurement Protocol on Google App Engine.", | ||
"version": "0.0.1", | ||
"private": true, | ||
"license": "Apache-2.0", | ||
|
@@ -10,16 +10,14 @@ | |
"url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
"node": "8.x.x" | ||
}, | ||
"scripts": { | ||
"deploy": "gcloud app deploy", | ||
"start": "node app.js", | ||
"lint": "repo-tools lint", | ||
"pretest": "npm run lint", | ||
"system-test": "repo-tools test app", | ||
"test": "npm run system-test", | ||
"e2e-test": "repo-tools test deploy" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this removed? (Perhaps because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, it's removed because |
||
"test": "npm run system-test" | ||
}, | ||
"dependencies": { | ||
"express": "4.16.2", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Writing Your Web Service Sample for Node.js in the App Engine Standard Environment | ||
|
||
This is the sample application for the | ||
[Writing Your Web Service with Node.js][tutorial] | ||
tutorial found in the [Google App Engine Node.js standard environment][appengine] | ||
documentation. | ||
|
||
* [Setup](#setup) | ||
* [Running locally](#running-locally) | ||
* [Deploying to App Engine](#deploying-to-app-engine) | ||
* [Running the tests](#running-the-tests) | ||
|
||
## Setup | ||
|
||
Before you can run or deploy the sample, you need to do the following: | ||
|
||
1. Refer to the [appengine/README.md][readme] file for instructions on | ||
running and deploying. | ||
1. Install dependencies: | ||
|
||
npm install | ||
|
||
## Running locally | ||
|
||
npm start | ||
|
||
## Deploying to App Engine | ||
|
||
gcloud app deploy | ||
|
||
## Running the tests | ||
|
||
See [Contributing][contributing]. | ||
|
||
[appengine]: https://cloud.google.com/appengine/docs/standard/nodejs | ||
[tutorial]: https://cloud.google.com/appengine/docs/standard/nodejs/building-app/writing-web-service | ||
[readme]: ../../README.md | ||
[contributing]: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/CONTRIBUTING.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright 2018, 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 app_yaml] | ||
runtime: nodejs8 | ||
# [END app_yaml] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"name": "appengine-standard-getting-started-build-apps", | ||
"version": "0.0.1", | ||
"description": "Node.js getting started sample for building an app on App Engine standard environment.", | ||
"private": true, | ||
"main": "server.js", | ||
"scripts": { | ||
"start": "node server.js", | ||
"deploy": "gcloud app deploy", | ||
"lint": "samples lint", | ||
"pretest": "npm run lint", | ||
"test": "samples test app" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git" | ||
}, | ||
"engines": { | ||
"node": "8.x.x" | ||
}, | ||
"author": "Google Inc.", | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
"express": "^4.16.3" | ||
}, | ||
"devDependencies": { | ||
"@google-cloud/nodejs-repo-tools": "1.4.17", | ||
"ava": "0.22.0", | ||
"semistandard": "^12.0.1" | ||
}, | ||
"cloud-repo-tools": { | ||
"requiresKeyFile": false, | ||
"requiresProjectId": false, | ||
"test": { | ||
"app": { | ||
"args": [ | ||
"server.js" | ||
], | ||
"msg": "Hello from App Engine!" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Copyright 2018, 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. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
// [START app] | ||
const express = require('express'); | ||
const app = express(); | ||
|
||
app.get('/', (req, res) => { | ||
res.send('Hello from App Engine!'); | ||
}); | ||
|
||
// Listen to the App Engine-specified port, or 8080 otherwise | ||
const PORT = process.env.PORT || 8080; | ||
app.listen(PORT, () => { | ||
console.log(`Server listening on port ${PORT}...`); | ||
}); | ||
// [END app] | ||
|
||
module.exports = app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Updating Your Web Service Sample for Node.js in the App Engine Standard Environment | ||
|
||
This is the sample application for the | ||
[Updating Your Web Service][tutorial] | ||
tutorial found in the [Google App Engine Node.js standard environment][appengine] | ||
documentation. | ||
|
||
* [Setup](#setup) | ||
* [Running locally](#running-locally) | ||
* [Deploying to App Engine](#deploying-to-app-engine) | ||
* [Running the tests](#running-the-tests) | ||
|
||
## Setup | ||
|
||
Before you can run or deploy the sample, you need to do the following: | ||
|
||
1. Refer to the [appengine/README.md][readme] file for instructions on | ||
running and deploying. | ||
1. Install dependencies: | ||
|
||
npm install | ||
|
||
## Running locally | ||
|
||
npm start | ||
|
||
## Deploying to App Engine | ||
|
||
gcloud app deploy | ||
|
||
## Running the tests | ||
|
||
See [Contributing][contributing]. | ||
|
||
[appengine]: https://cloud.google.com/appengine/docs/standard/nodejs | ||
[tutorial]: https://cloud.google.com/appengine/docs/standard/nodejs/building-app/updating-web-service | ||
[readme]: ../../README.md | ||
[contributing]: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/CONTRIBUTING.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright 2018, 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 app_yaml] | ||
runtime: nodejs8 | ||
# [END app_yaml] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "appengine-standard-getting-started-update-apps", | ||
"version": "0.0.1", | ||
"description": "Node.js getting started sample for updating an app on App Engine standard environment.", | ||
"private": true, | ||
"main": "server.js", | ||
"scripts": { | ||
"start": "node server.js", | ||
"deploy": "gcloud app deploy", | ||
"lint": "samples lint", | ||
"pretest": "npm run lint", | ||
"test": "ava --verbose test/*.test.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git" | ||
}, | ||
"engines": { | ||
"node": "8.x.x" | ||
}, | ||
"author": "Google Inc.", | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
"body-parser": "^1.18.2", | ||
"express": "^4.16.3", | ||
"semistandard": "^12.0.1" | ||
}, | ||
"devDependencies": { | ||
"@google-cloud/nodejs-repo-tools": "1.4.17", | ||
"ava": "0.22.0", | ||
"semistandard": "^12.0.1" | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmdobry @lukesneeringer Which versions of Node do we support? AFAIK, this is too restrictive (at least for Flex).
@michaelawyu if you make any changes as a result of this comment, please apply those changes to any other
package.json
files that have this issue.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node 4+, until April 30 when Node 4 reaches end of life and we can switch our samples to support Node 6+