diff --git a/functions/helloworld/index.js b/functions/helloworld/index.js index 52bda4c962..cd65c4a9cb 100644 --- a/functions/helloworld/index.js +++ b/functions/helloworld/index.js @@ -150,16 +150,3 @@ exports.helloError4 = (req, res) => { res.status(500).send('I failed you'); // [END functions_helloworld_error] }; - -// [START functions_helloworld_template] -const path = require('path'); -const pug = require('pug'); - -// Renders the index.pug -exports.helloTemplate = (req, res) => { - // Render the index.pug file - const html = pug.renderFile(path.join(__dirname, 'index.pug')); - - res.send(html).end(); -}; -// [END functions_helloworld_template] diff --git a/functions/helloworld/index.pug b/functions/helloworld/index.pug deleted file mode 100644 index f4e3f02e43..0000000000 --- a/functions/helloworld/index.pug +++ /dev/null @@ -1,9 +0,0 @@ -doctype html -html(lang="en") - head - title= pageTitle - body - h1 Cloud Functions Template Sample - p. - Pug is a terse and simple templating language with a - strong focus on performance and powerful features. diff --git a/functions/helloworld/package.json b/functions/helloworld/package.json index 966d36ef91..b6f9cf0395 100644 --- a/functions/helloworld/package.json +++ b/functions/helloworld/package.json @@ -18,8 +18,7 @@ }, "dependencies": { "@google-cloud/debug-agent": "^5.0.0", - "escape-html": "^1.0.3", - "pug": "^3.0.0" + "escape-html": "^1.0.3" }, "devDependencies": { "@google-cloud/functions-framework": "^1.1.1", diff --git a/functions/helloworld/test/index.test.js b/functions/helloworld/test/index.test.js index c8de7f823b..d6b37d1642 100644 --- a/functions/helloworld/test/index.test.js +++ b/functions/helloworld/test/index.test.js @@ -156,26 +156,4 @@ describe('index.test.js', () => { }); }); }); - - describe('functions_helloworld_template helloTemplate', () => { - const PORT = 8085; - let ffProc; - - before(() => { - ffProc = startFF('helloTemplate', 'http', PORT); - }); - - after(async () => { - await ffProc; - }); - - it('helloTemplate: should render the html', async () => { - const response = await httpInvocation('helloTemplate', PORT); - - assert.strictEqual(response.statusCode, 200); - assert.ok( - response.body.includes('