diff --git a/appengine/endpoints/app.js b/appengine/endpoints/app.js index a28f6cb837f..7df2277df16 100644 --- a/appengine/endpoints/app.js +++ b/appengine/endpoints/app.js @@ -15,15 +15,12 @@ 'use strict'; -// [START app] -// [START setup] const express = require('express'); const bodyParser = require('body-parser'); const Buffer = require('safe-buffer').Buffer; const app = express(); app.use(bodyParser.json()); -// [END setup] app.post('/echo', (req, res) => { res.status(200).json({ message: req.body.message }); @@ -42,14 +39,11 @@ app.get('/auth/info/googlejwt', authInfoHandler); app.get('/auth/info/googleidtoken', authInfoHandler); if (module === require.main) { - // [START listen] const PORT = process.env.PORT || 8080; app.listen(PORT, () => { console.log(`App listening on port ${PORT}`); console.log('Press Ctrl+C to quit.'); }); - // [END listen] } -// [END app] module.exports = app; diff --git a/appengine/errorreporting/app.flexible.yaml b/appengine/errorreporting/app.flexible.yaml index 248738be702..41e9fef5d73 100644 --- a/appengine/errorreporting/app.flexible.yaml +++ b/appengine/errorreporting/app.flexible.yaml @@ -11,7 +11,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START app_yaml] runtime: nodejs env: flex -# [END app_yaml] diff --git a/appengine/errorreporting/app.js b/appengine/errorreporting/app.js index 620af5fd404..e02c16ffcea 100644 --- a/appengine/errorreporting/app.js +++ b/appengine/errorreporting/app.js @@ -13,15 +13,12 @@ * limitations under the License. */ -// [START app] 'use strict'; -// [START setup] const express = require('express'); const errors = require('@google-cloud/error-reporting')(); const app = express(); -// [END setup] app.get('/', (req, res, next) => { next(new Error('something is wrong!')); @@ -32,13 +29,10 @@ app.use((err, req, res, next) => { res.status(500).send(err.message || 'Something broke!'); }); -// [START listen] const PORT = process.env.PORT || 8080; app.listen(PORT, () => { console.log(`App listening on port ${PORT}`); console.log('Press Ctrl+C to quit.'); }); -// [END listen] -// [END app] module.exports = app; diff --git a/appengine/errorreporting/app.standard.yaml b/appengine/errorreporting/app.standard.yaml index 8cf0f07dc88..86cf9f35c43 100644 --- a/appengine/errorreporting/app.standard.yaml +++ b/appengine/errorreporting/app.standard.yaml @@ -11,6 +11,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START app_yaml] runtime: nodejs8 -# [END app_yaml] diff --git a/appengine/grunt/Gruntfile.js b/appengine/grunt/Gruntfile.js index 1f4ee6411d3..6dfaa1d7dbe 100644 --- a/appengine/grunt/Gruntfile.js +++ b/appengine/grunt/Gruntfile.js @@ -15,7 +15,6 @@ module.exports = function (grunt) { grunt.initConfig({ - // [START config] jshint: { files: ['Gruntfile.js', 'src/**/*.js'], options: { @@ -31,7 +30,6 @@ module.exports = function (grunt) { dest: 'src/public/stylesheets/style.min.css' } }, - // [END config] clean: ['src/public/stylesheets/style.min.css'], watch: { js: { @@ -48,12 +46,10 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-clean'); - // [START tasks] grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.registerTask('build', ['jshint', 'cssmin']); - // [END tasks] grunt.registerTask('default', ['watch']); }; diff --git a/appengine/grunt/app.yaml b/appengine/grunt/app.yaml index 248738be702..41e9fef5d73 100644 --- a/appengine/grunt/app.yaml +++ b/appengine/grunt/app.yaml @@ -11,7 +11,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START app_yaml] runtime: nodejs env: flex -# [END app_yaml] diff --git a/appengine/grunt/src/routes/index.js b/appengine/grunt/src/routes/index.js index 9de523759d2..234101e39e6 100644 --- a/appengine/grunt/src/routes/index.js +++ b/appengine/grunt/src/routes/index.js @@ -18,12 +18,10 @@ const express = require('express'); const router = express.Router(); -// [START hello_world] router.get('/', (req, res) => { res.render('index', { title: 'Hello World! Express.js + Grunt.js on Google App Engine.' }); }); -// [END hello_world] module.exports = router; diff --git a/appengine/hello-world/standard/app.yaml b/appengine/hello-world/standard/app.yaml index 8f8f6fd97a6..8eac1d296bd 100644 --- a/appengine/hello-world/standard/app.yaml +++ b/appengine/hello-world/standard/app.yaml @@ -11,6 +11,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START app_yaml] +# [START gae_quickstart_yaml] runtime: nodejs8 -# [END app_yaml] +# [END gae_quickstart_yaml] diff --git a/appengine/loopback/app.flexible.yaml b/appengine/loopback/app.flexible.yaml index 248738be702..41e9fef5d73 100644 --- a/appengine/loopback/app.flexible.yaml +++ b/appengine/loopback/app.flexible.yaml @@ -11,7 +11,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START app_yaml] runtime: nodejs env: flex -# [END app_yaml] diff --git a/appengine/loopback/app.standard.yaml b/appengine/loopback/app.standard.yaml index 8cf0f07dc88..86cf9f35c43 100644 --- a/appengine/loopback/app.standard.yaml +++ b/appengine/loopback/app.standard.yaml @@ -11,6 +11,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START app_yaml] runtime: nodejs8 -# [END app_yaml] diff --git a/appengine/memcached/app.standard.yaml b/appengine/memcached/app.standard.yaml index 4f1694747e8..452bf4aaa48 100644 --- a/appengine/memcached/app.standard.yaml +++ b/appengine/memcached/app.standard.yaml @@ -13,7 +13,7 @@ runtime: nodejs8 -# [START gae_flex_redislabs_memcache_yaml] +# [START gae_redislabs_memcache_yaml] # The following env variables may contain sensitive information that grants # anyone access to your memcached service. Do not add this file to your source # control. @@ -23,4 +23,4 @@ env_variables: # fill in these values with your username and password. MEMCACHE_USERNAME: your-memcache-username MEMCACHE_PASSWORD: your-memcache-password -# [END gae_flex_redislabs_memcache_yaml] +# [END gae_redislabs_memcache_yaml] diff --git a/appengine/metadata/flexible/app.yaml b/appengine/metadata/flexible/app.yaml index 690f318f28f..4dfe96aa238 100644 --- a/appengine/metadata/flexible/app.yaml +++ b/appengine/metadata/flexible/app.yaml @@ -11,7 +11,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START app_yaml] runtime: nodejs env: flex -# [END app_yaml] \ No newline at end of file diff --git a/appengine/metadata/flexible/server.js b/appengine/metadata/flexible/server.js index e2192abcb04..414c486b47f 100644 --- a/appengine/metadata/flexible/server.js +++ b/appengine/metadata/flexible/server.js @@ -15,7 +15,7 @@ 'use strict'; -// [START appengine_metadata] +// [START gae_flex_metadata] const express = require('express'); const request = require('got'); @@ -57,4 +57,4 @@ app.listen(PORT, () => { console.log(`App listening on port ${PORT}`); console.log('Press Ctrl+C to quit.'); }); -// [END appengine_metadata] +// [END gae_flex_metadata] diff --git a/appengine/metadata/standard/app.yaml b/appengine/metadata/standard/app.yaml index 25df3f3dffc..bbf4f920dc5 100644 --- a/appengine/metadata/standard/app.yaml +++ b/appengine/metadata/standard/app.yaml @@ -11,6 +11,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START app_yaml] runtime: nodejs8 -# [END app_yaml] \ No newline at end of file diff --git a/appengine/metadata/standard/server.js b/appengine/metadata/standard/server.js index 98e1a99e966..13774a37508 100644 --- a/appengine/metadata/standard/server.js +++ b/appengine/metadata/standard/server.js @@ -15,7 +15,6 @@ 'use strict'; -// [START appengine_metadata] const express = require('express'); const request = require('got'); @@ -55,4 +54,3 @@ app.listen(PORT, () => { console.log(`App listening on port ${PORT}`); console.log('Press Ctrl+C to quit.'); }); -// [END appengine_metadata] diff --git a/appengine/mongodb/app.flexible.yaml b/appengine/mongodb/app.flexible.yaml index 248738be702..41e9fef5d73 100644 --- a/appengine/mongodb/app.flexible.yaml +++ b/appengine/mongodb/app.flexible.yaml @@ -11,7 +11,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START app_yaml] runtime: nodejs env: flex -# [END app_yaml] diff --git a/appengine/mongodb/app.standard.yaml b/appengine/mongodb/app.standard.yaml index 8cf0f07dc88..86cf9f35c43 100644 --- a/appengine/mongodb/app.standard.yaml +++ b/appengine/mongodb/app.standard.yaml @@ -11,6 +11,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START app_yaml] runtime: nodejs8 -# [END app_yaml] diff --git a/appengine/mongodb/server.js b/appengine/mongodb/server.js index d3d718dc7a8..1bf6668bf40 100644 --- a/appengine/mongodb/server.js +++ b/appengine/mongodb/server.js @@ -31,7 +31,6 @@ const pass = nconf.get('mongoPass'); const host = nconf.get('mongoHost'); const port = nconf.get('mongoPort'); -// [START client] let uri = `mongodb://${user}:${pass}@${host}:${port}`; if (nconf.get('mongoDatabase')) { uri = `${uri}/${nconf.get('mongoDatabase')}`; @@ -86,4 +85,3 @@ mongodb.MongoClient.connect(uri, (err, client) => { console.log('started web process'); }); }); -// [END client] diff --git a/appengine/parse-server/app.flexible.yaml b/appengine/parse-server/app.flexible.yaml index 95b81be533f..4dfe96aa238 100644 --- a/appengine/parse-server/app.flexible.yaml +++ b/appengine/parse-server/app.flexible.yaml @@ -11,7 +11,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START app_yaml] runtime: nodejs env: flex -# [END app_yaml] diff --git a/appengine/parse-server/app.standard.yaml b/appengine/parse-server/app.standard.yaml index ab74945fd7a..bbf4f920dc5 100644 --- a/appengine/parse-server/app.standard.yaml +++ b/appengine/parse-server/app.standard.yaml @@ -11,6 +11,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START app_yaml] runtime: nodejs8 -# [END app_yaml] diff --git a/appengine/parse-server/server.js b/appengine/parse-server/server.js index b8c9387c2e0..eaff9854d8d 100644 --- a/appengine/parse-server/server.js +++ b/appengine/parse-server/server.js @@ -15,7 +15,6 @@ 'use strict'; -// [START app] const express = require('express'); const nconf = require('nconf'); const ParseServer = require('parse-server').ParseServer; @@ -46,4 +45,3 @@ app.listen(PORT, () => { console.log(`App listening on port ${PORT}`); console.log('Press Ctrl+C to quit.'); }); -// [END app] diff --git a/appengine/pubsub/app.standard.yaml b/appengine/pubsub/app.standard.yaml index 58f8b8c677d..382ed522e02 100644 --- a/appengine/pubsub/app.standard.yaml +++ b/appengine/pubsub/app.standard.yaml @@ -15,10 +15,10 @@ runtime: nodejs8 instance_class: F2 -# [START gae_flex_pubsub_yaml] +# [START gae_pubsub_yaml] env_variables: PUBSUB_TOPIC: YOUR_TOPIC_NAME # This token is used to verify that requests originate from your # application. It can be any sufficiently random string. PUBSUB_VERIFICATION_TOKEN: YOUR_VERIFICATION_TOKEN -# [END gae_flex_pubsub_yaml] +# [END gae_pubsub_yaml] diff --git a/appengine/redis/app.flexible.yaml b/appengine/redis/app.flexible.yaml index 248738be702..41e9fef5d73 100644 --- a/appengine/redis/app.flexible.yaml +++ b/appengine/redis/app.flexible.yaml @@ -11,7 +11,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START app_yaml] runtime: nodejs env: flex -# [END app_yaml] diff --git a/appengine/redis/app.standard.yaml b/appengine/redis/app.standard.yaml index 8cf0f07dc88..86cf9f35c43 100644 --- a/appengine/redis/app.standard.yaml +++ b/appengine/redis/app.standard.yaml @@ -11,6 +11,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START app_yaml] runtime: nodejs8 -# [END app_yaml]