{"id":20123157,"url":"https://github.com/olegkorol/firebase-cloud-functions-typescript","last_synced_at":"2025-05-06T16:33:44.522Z","repository":{"id":44220876,"uuid":"155614814","full_name":"olegkorol/firebase-cloud-functions-typescript","owner":"olegkorol","description":"Boilerplate code with multiple Firebase Cloud Functions in one repository","archived":false,"fork":false,"pushed_at":"2022-12-09T06:16:27.000Z","size":945,"stargazers_count":6,"open_issues_count":8,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T14:40:39.519Z","etag":null,"topics":["cloud-function-for-firebase","firebase","firebase-admin-sdk","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olegkorol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-31T19:49:13.000Z","updated_at":"2024-04-23T06:41:40.000Z","dependencies_parsed_at":"2023-01-25T11:35:11.019Z","dependency_job_id":null,"html_url":"https://github.com/olegkorol/firebase-cloud-functions-typescript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olegkorol%2Ffirebase-cloud-functions-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olegkorol%2Ffirebase-cloud-functions-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olegkorol%2Ffirebase-cloud-functions-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olegkorol%2Ffirebase-cloud-functions-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olegkorol","download_url":"https://codeload.github.com/olegkorol/firebase-cloud-functions-typescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252721112,"owners_count":21793754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud-function-for-firebase","firebase","firebase-admin-sdk","typescript"],"created_at":"2024-11-13T19:43:43.698Z","updated_at":"2025-05-06T16:33:44.164Z","avatar_url":"https://github.com/olegkorol.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# firebase-cloud-functions-typescript\n\n## Firebase Cloud Functions (TypeScript)\n\n### Quick start\n\n\u003e Requirement: Node.js \u003e= v.8\n\n```bash\n# To quickly deploy (or update existing) Firebase Functions to GCP:\n$ cd firebase-functions\n$ npm install\n# set your default project name in the firebase.json file, and then run:\n$ npm run deploy\n\n# In order to deploy single functions, you will have to install `firebase-tools` locally:\n$ npm install -g firebase-tools\n$ firebase deploy --only functions:{functionName}\n# The function names can be found in firebase-functions/src/index.ts, e.g. \"firebase_firebaseFunction1\"\n```\n\nThe \"deploy\" command will run tslint, transpile into JavaScript (ES2017) under the \"lib\" directory, perform unit tests and deploy the transpiled code to Google Cloud Platform.\n\n**Important note: All functions using the \"firebase-admin\" SDK should initialize the SDK in the following manner:**\n\n```javascript\nimport * as functions from 'firebase-functions';\nimport * as admin from \"firebase-admin\";\ntry {admin.initializeApp(functions.config().firebase);} catch(e) {}\n```\n\nOtherwise, the SDK might be initialized more than once - which will lead to an error on deployment.\n\n### Unit Testing\n\nThe Firebase Cloud Functions use unit tests using Mocha and Chai for assertions.\n\n### Creating new functions\n\nCreate a `.ts` file under `firebase-functions/src/`.\n\nAfter that export the function in the `index.ts` file.\n\nIf you want to create any unit tests, do so in the `test` folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folegkorol%2Ffirebase-cloud-functions-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folegkorol%2Ffirebase-cloud-functions-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folegkorol%2Ffirebase-cloud-functions-typescript/lists"}