This is the full Cloud Functions code explained in my blog post: How to schedule a Cloud Function to run in the future (in order to build a Firestore document TTL)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Temporary wrapper for firebase functions until @sentry/serverless support is implemented | |
* It currently supports wrapping https, pubsub and firestore handlers. | |
* usage: https.onRequest(wrap((req, res) => {...})) | |
*/ | |
import type {Event} from '@sentry/types'; | |
import type {https} from 'firebase-functions'; | |
import type {onRequest, onCall} from 'firebase-functions/lib/providers/https'; | |
import type {ScheduleBuilder} from 'firebase-functions/lib/providers/pubsub'; | |
import type {DocumentBuilder} from 'firebase-functions/lib/providers/firestore'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
/** | |
* Helper function infers Webpack aliases from tsconfig.json compilerOptions.baseUrl and | |
* compilerOptions.paths. | |
* | |
* @param {string} tsconfigPath - Path to tsconfig.json (can be either relative or absolute path). | |
* @return {object} An object representing analogous Webpack alias. | |
*/ | |
module.exports = (tsconfigPath = './tsconfig.json') => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// parameters | |
$hubVerifyToken = 'TOKEN123456abcd'; | |
$accessToken = "xxx"; | |
// check token at setup | |
if ($_REQUEST['hub_verify_token'] === $hubVerifyToken) { | |
echo $_REQUEST['hub_challenge']; | |
exit; | |
} |