-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge samples for Flex and Std (#590)
* Merge samples for Flex and Std * Solve conflicts * MInor Fixes * More minor fixes * Lint * Applied requested changes
- Loading branch information
chenyumic
authored
Apr 11, 2018
1 parent
daf141d
commit c11163d
Showing
108 changed files
with
1,511 additions
and
139 deletions.
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
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.