Last active
August 12, 2017 05:52
-
-
Save nhathiwala/aafa4703ff82cfa97b2ba41426b1931c to your computer and use it in GitHub Desktop.
firefunctions/src/lib/index.ts
This file contains hidden or 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
/* | |
* FILE NAME: index.ts | |
* FILE PATH: './lib/' | |
* AUTHOR: NAYAN HATHIWALA | |
* CREATED ON: 10/8/2017 | |
* DESCRIPTION: All necessary library initialization are to be done in this file. | |
*/ | |
// IMPORT LIBRARY HERE | |
const googleCloudDatastore = require('@google-cloud/datastore')({ | |
projectId: 'you-project-id', | |
keyFilename: './gcloud-keyfile.json' | |
}); | |
/* | |
* Validate Firebase Token ID via `HEADER` or `COOKIE` | |
* Source: https://github.com/firebase/functions-samples/blob/master/authorized-https-endpoint/functions/index.js | |
*/ | |
export const validateFireTokenId = (req: any , res: any, next: any) => { | |
... | |
} | |
/* | |
* MAKE YOUR LIBARAY INITIALIZED EXPORT HERE | |
*/ | |
export const datastore = googleCloudDatastore; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment