Skip to content

Commit 700c575

Browse files
Merge branch 'main' into hivanalejandro-update-region-step1-401223470
2 parents ab723c1 + 73d8c32 commit 700c575

File tree

4 files changed

+4
-23
lines changed

4 files changed

+4
-23
lines changed

appengine/building-an-app/update/app.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313

14+
# [START gae_app_yaml]
1415
# [START app_yaml]
1516
runtime: nodejs20
1617
# [END app_yaml]
18+
# [END gae_app_yaml]

appengine/building-an-app/update/server.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
'use strict';
1616

1717
// [START gae_update_web_server_app]
18-
// [START app]
19-
// [START gae_update_app]
2018
const express = require('express');
2119
const path = require('path');
2220

@@ -31,15 +29,12 @@ app.get('/', (req, res) => {
3129
res.send('Hello from App Engine!');
3230
});
3331

34-
// [START add_display_form]
3532
// [START gae_add_display_form]
3633
app.get('/submit', (req, res) => {
3734
res.sendFile(path.join(__dirname, '/views/form.html'));
3835
});
3936
// [END gae_add_display_form]
40-
// [END add_display_form]
4137

42-
// [START add_post_handler]
4338
// [START gae_add_post_handler]
4439
app.post('/submit', (req, res) => {
4540
console.log({
@@ -49,15 +44,12 @@ app.post('/submit', (req, res) => {
4944
res.send('Thanks for your message!');
5045
});
5146
// [END gae_add_post_handler]
52-
// [END add_post_handler]
5347

5448
// Listen to the App Engine-specified port, or 8080 otherwise
5549
const PORT = parseInt(process.env.PORT) || 8080;
5650
app.listen(PORT, () => {
5751
console.log(`Server listening on port ${PORT}...`);
5852
});
59-
// [END gae_update_app]
60-
// [END app]
6153
// [END gae_update_web_server_app]
6254

6355
module.exports = app;

appengine/building-an-app/update/test/server.test.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,6 @@ const restoreConsole = function () {
3636
beforeEach(stubConsole);
3737
afterEach(restoreConsole);
3838

39-
describe('gae_update_app', () => {
40-
it('should send greetings', async () => {
41-
await requestObj
42-
.get('/')
43-
.expect(200)
44-
.expect(response => {
45-
assert.strictEqual(response.text, 'Hello from App Engine!');
46-
});
47-
});
48-
});
49-
5039
describe('gae_update_web_server_app', () => {
5140
it('should send greetings', async () => {
5241
await requestObj
@@ -58,7 +47,7 @@ describe('gae_update_web_server_app', () => {
5847
});
5948
});
6049

61-
describe('gae_add_display_form add_display_form', () => {
50+
describe('gae_add_display_form', () => {
6251
it('should display form', async () => {
6352
await requestObj
6453
.get('/submit')
@@ -74,7 +63,7 @@ describe('gae_add_display_form add_display_form', () => {
7463
});
7564
});
7665

77-
describe('gae_add_post_handler add_post_handler gae_enable_parser', () => {
66+
describe('gae_add_post_handler gae_enable_parser', () => {
7867
it('should record message', async () => {
7968
await requestObj
8069
.post('/submit', {

speech/profanityFilter.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
function main(gcsUri) {
1818
// [START speech_syncRecognizeWithProfanityFilter]
19-
// [START syncRecognizeWithProfanityFilter]
2019
// Filters profanity
2120

2221
/**
@@ -54,7 +53,6 @@ function main(gcsUri) {
5453
console.log(`Transcription: ${transcription}`);
5554
}
5655
syncRecognizeWithProfanityFilter().catch(console.error);
57-
// [END syncRecognizeWithProfanityFilter]
5856
// [END speech_syncRecognizeWithProfanityFilter]
5957
}
6058

0 commit comments

Comments
 (0)