There was an error while loading. Please reload this page.
1 parent f766f50 commit d589d78Copy full SHA for d589d78
functions/helloworld/index.js
@@ -150,12 +150,13 @@ exports.helloError3 = function helloError3 (event, callback) {
150
/* eslint-enable */
151
152
// [START functions_helloworld_template]
153
+const path = require('path');
154
const pug = require('pug');
155
156
// Renders the index.pug
157
exports.helloTemplate = (req, res) => {
158
// Render the index.pug file
- const html = pug.renderFile('./index.pug');
159
+ const html = pug.renderFile(path.join(__dirname, 'index.pug'));
160
161
res.send(html).end();
162
};
0 commit comments