facebook twitter hatena line email

「Gcp/Firebase/CloudFunctions/request」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(ページの作成:「functions/index.js <pre> exports.log = functions.https.onRequest((request, response) => { response.send("Hello from Firebase!log"); const errorlog = request.query['error...」)
 
行2: 行2:
 
<pre>
 
<pre>
 
exports.log = functions.https.onRequest((request, response) => {
 
exports.log = functions.https.onRequest((request, response) => {
response.send("Hello from Firebase!log");
+
  const errorlog = request.query['errorlog']
const errorlog = request.query['errorlog']
+
  console.error(errorlog);
console.error(errorlog);
+
  response.send("Hello from Firebase!log");
 
});
 
});
 
</pre>
 
</pre>

2019年6月12日 (水) 12:28時点における版

functions/index.js

exports.log = functions.https.onRequest((request, response) => {
  const errorlog = request.query['errorlog']
  console.error(errorlog);
  response.send("Hello from Firebase!log");
});