diff --git a/endpoints/getting-started/app.js b/endpoints/getting-started/app.js index ab2f900653..bca7372bf6 100644 --- a/endpoints/getting-started/app.js +++ b/endpoints/getting-started/app.js @@ -15,6 +15,7 @@ // [START endpoints_express_auth] 'use strict'; +// [START endpoints_server_setup] // [START setup] const express = require('express'); @@ -25,6 +26,7 @@ app.set('case sensitive routing', true); // This middleware is available in Express v4.16.0 onwards app.use(express.json()); // [END setup] +// [END endpoints_server_setup] app.post('/echo', (req, res) => { res.status(200).json({message: req.body.message}).end(); @@ -43,6 +45,7 @@ app.get('/auth/info/googlejwt', authInfoHandler); app.get('/auth/info/googleidtoken', authInfoHandler); if (module === require.main) { + // [START endpoints_server_listen] // [START listen] const PORT = parseInt(process.env.PORT) || 8080; app.listen(PORT, () => { @@ -50,6 +53,7 @@ if (module === require.main) { console.log('Press Ctrl+C to quit.'); }); // [END listen] + // [END endpoints_server_listen] } // [END endpoints_express_auth] diff --git a/speech/profanityFilter.js b/speech/profanityFilter.js index 897593259f..e9f8273757 100644 --- a/speech/profanityFilter.js +++ b/speech/profanityFilter.js @@ -15,6 +15,7 @@ 'use strict'; function main(gcsUri) { + // [START speech_syncRecognizeWithProfanityFilter] // [START syncRecognizeWithProfanityFilter] // Filters profanity @@ -54,6 +55,7 @@ function main(gcsUri) { } syncRecognizeWithProfanityFilter().catch(console.error); // [END syncRecognizeWithProfanityFilter] + // [END speech_syncRecognizeWithProfanityFilter] } main(...process.argv.slice(2));