{"id":24868631,"url":"https://github.com/web-seven/serverless-firebase-functions","last_synced_at":"2025-07-06T23:02:21.503Z","repository":{"id":57143568,"uuid":"197782695","full_name":"web-seven/serverless-firebase-functions","owner":"web-seven","description":"Serverless Firebase Functions","archived":false,"fork":false,"pushed_at":"2019-10-15T16:32:25.000Z","size":23,"stargazers_count":12,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T11:45:49.175Z","etag":null,"topics":["firebase-functions","serverless","typescript","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/web-seven.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-19T14:02:59.000Z","updated_at":"2023-08-04T16:19:39.000Z","dependencies_parsed_at":"2022-09-03T17:40:16.407Z","dependency_job_id":null,"html_url":"https://github.com/web-seven/serverless-firebase-functions","commit_stats":null,"previous_names":["headsquad/serverless-firebase-functions"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-seven%2Fserverless-firebase-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-seven%2Fserverless-firebase-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-seven%2Fserverless-firebase-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-seven%2Fserverless-firebase-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web-seven","download_url":"https://codeload.github.com/web-seven/serverless-firebase-functions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236610436,"owners_count":19176826,"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":["firebase-functions","serverless","typescript","webpack"],"created_at":"2025-02-01T02:29:35.849Z","updated_at":"2025-02-01T02:29:36.397Z","avatar_url":"https://github.com/web-seven.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless Firebase Functions Plugin\n\nThis plugin enables support for HTTP/PubSub NodeJS/TypeScript [Firebase Functions](https://firebase.google.com/products/functions/) within the [Serverless Framework](https://github.com/serverless/serverless).\n\n## Highlights\n\n* Convert transparent HTTP and PubSub functions to Firebase compatible function\n* Deploy Firebase Function sources individually, no more another function sources deployed !!!\n* Deploy any HTTP handler based on Express request/response to Firebase Functions without any adaptation.\n* Support TypeScript functions\n* Environment variables automatically managed by Cloud Runtime Configuration API\n* Based on [serverless-webpack](https://www.npmjs.com/package/serverless-webpack) plugin for package sources\n* Based on official [Firebase Tools](https://www.npmjs.com/package/firebase-tools) and [Firebase Admin](https://www.npmjs.com/package/firebase-admin)\n* Support NPM and Yarn for packaging\n\n## Install\n\n```bash\n$ npm install serverless-firebase-functions --save-dev\n```\n\nAdd the plugin to your `serverless.yml` file:\n\n```yaml\nplugins:\n  - serverless-firebase-functions\n  - serverless-webpack\n```\n\n## Configure\nFirstly require to configure [serverless-webpack](https://www.npmjs.com/package/serverless-webpack) plugin.\n\n```js\n// webpack.config.js\nconst path = require('path');\nconst slsw = require('serverless-webpack');\n\nmodule.exports = {\n  entry: slsw.lib.entries,\n  resolve: {\n    extensions: [\n      '.js',\n      '.json',\n      '.ts',\n      '.tsx'\n    ]\n  },\n  output: {\n    libraryTarget: 'commonjs',\n    path: path.join(__dirname, '.webpack'),\n    filename: '[name].js'\n  },\n  target: 'node',\n  module: {\n    rules: [\n      {\n        test: /\\.ts(x?)$/,\n        use: [\n          {\n            loader: 'ts-loader'\n          }\n        ],\n      }\n    ]\n  }\n};\n```\n\nNext requried to configure Firebase Serverless provider and standard configuration for Firebase Functions deploy.\n\n```yaml\nprovider:\n  name: firebase\n  stage: dev\n  runtime: nodejs8 # nodejs8 or nodejs10\n  region: myFirebaseDeployRegion #eg. \"us-central1\". See there: https://firebase.google.com/docs/functions/locations\n  project: myFireabaseProjectName #See there: https://firebase.google.com/docs/projects/learn-more\n  token: myFirebaseAccessToken #See how to generate it there: https://www.npmjs.com/package/firebase-tools#using-with-ci-systems\n  environment:\n    serviceEnvVar: someValue\n\npackage:\n  individually: true\n\nfunctions:\n  myHttpFunction:\n    handler: handlers/myHandlerFile.myFunctionName\n    environment:\n        serviceEnvVar: overServiceValue\n    events:\n      - http: \n          path: myHttpUrlPath\n          method: GET|PUT|POST|DELETE\n  myPubSubFunction:\n    handler: handlers/myHandlerFile.myFunctionName\n    environment:\n        functionEnvVar: someValue\n    events:\n      - pubsub: \n          topic: myPubSubMessageTopic\n```\n\n## Deployment\n\n```bash\n$ serverless deploy\n```\n\n## To Do\n- [x] Use webpack to deploy function with packed dependencies.\n- [x] Deploy functions clean, without other handler sources.\n- [x] Add PubSub functions support.\n- [x] Base on pure Firebase Tools API.\n- [x] Add inherited environment variables support.\n- [ ] Optimize deployment, make it parallel for every function.\n- [ ] Make possible to deploy external packages functions from \"node_modules\", just by mention them in config.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb-seven%2Fserverless-firebase-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb-seven%2Fserverless-firebase-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb-seven%2Fserverless-firebase-functions/lists"}