Skip to content

Commit

Permalink
Merge branch 'main' into hivanalejandro-migrate-region-step4-393605656
Browse files Browse the repository at this point in the history
  • Loading branch information
iennae authored Feb 7, 2025
2 parents cdda9f4 + fd3b6c1 commit b70c4df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions endpoints/getting-started/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// [START endpoints_express_auth]
'use strict';

// [START endpoints_server_setup]
// [START setup]
const express = require('express');

Expand All @@ -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();
Expand All @@ -43,13 +45,15 @@ 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, () => {
console.log(`App listening on port ${PORT}`);
console.log('Press Ctrl+C to quit.');
});
// [END listen]
// [END endpoints_server_listen]
}
// [END endpoints_express_auth]

Expand Down
2 changes: 2 additions & 0 deletions speech/profanityFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

function main(gcsUri) {
// [START speech_syncRecognizeWithProfanityFilter]
// [START syncRecognizeWithProfanityFilter]
// Filters profanity

Expand Down Expand Up @@ -54,6 +55,7 @@ function main(gcsUri) {
}
syncRecognizeWithProfanityFilter().catch(console.error);
// [END syncRecognizeWithProfanityFilter]
// [END speech_syncRecognizeWithProfanityFilter]
}

main(...process.argv.slice(2));

0 comments on commit b70c4df

Please sign in to comment.