{"id":19562477,"url":"https://github.com/inpassor/ts-firebase-application","last_synced_at":"2026-05-06T09:41:52.867Z","repository":{"id":42934204,"uuid":"237604592","full_name":"Inpassor/ts-firebase-application","owner":"Inpassor","description":"Firebase application","archived":false,"fork":false,"pushed_at":"2023-01-09T12:10:53.000Z","size":284,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-10T01:47:20.478Z","etag":null,"topics":["application","firebase","node"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Inpassor.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":"2020-02-01T11:28:10.000Z","updated_at":"2020-04-30T17:10:49.000Z","dependencies_parsed_at":"2023-02-08T11:01:34.048Z","dependency_job_id":null,"html_url":"https://github.com/Inpassor/ts-firebase-application","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inpassor%2Fts-firebase-application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inpassor%2Fts-firebase-application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inpassor%2Fts-firebase-application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inpassor%2Fts-firebase-application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Inpassor","download_url":"https://codeload.github.com/Inpassor/ts-firebase-application/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240822590,"owners_count":19863302,"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":["application","firebase","node"],"created_at":"2024-11-11T05:14:44.119Z","updated_at":"2026-05-06T09:41:52.788Z","avatar_url":"https://github.com/Inpassor.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Firebase application\n\n[![](https://img.shields.io/npm/v/@inpassor/firebase-application.svg?style=flat)](https://www.npmjs.com/package/@inpassor/firebase-application)\n[![](https://img.shields.io/github/license/Inpassor/ts-firebase-application.svg?style=flat-square)](https://github.com/Inpassor/ts-firebase-application/blob/master/LICENSE)\n![](https://img.shields.io/npm/dt/@inpassor/firebase-application.svg?style=flat-square)\n\nThis library is a handy wrapper for [@inpassor/node-server](https://github.com/Inpassor/ts-node-server).\n\nIt provides a single function **firebaseApplication** creating a Firebase Cloud function:\n```\nfirebaseApplication: (\n   getConfig: ServerConfig | Promise\u003cServerConfig\u003e,\n   runtimeOptions?: RuntimeOptions,\n) =\u003e HttpsFunction\n```\n\n## Installation\n```bash\nnpm install @inpassor/firebase-application --save\n```\n\n## Usage\n```typescript\nimport { firebaseApplication, Component, ServerConfig } from '@inpassor/firebase-application';\n\nclass DemoComponent extends Component {\n    public get(): void {\n        console.log(this.request.params);\n        // You can use here:\n        // this.app.firebaseApp\n        // this.app.firestore\n        this.send(200, 'This is the DemoComponent GET action');\n    }\n}\n\nconst config: ServerConfig = {\n    headers: {\n        'Access-Control-Allow-Methods': 'OPTIONS, GET',\n        'Access-Control-Allow-Credentials': 'true',\n        'Access-Control-Allow-Headers': 'content-type, authorization',\n    },\n    sameOrigin: true,\n    routes: [\n        {\n            path: 'demo\u003c/arg|?\u003e',\n            component: DemoComponent,\n        },\n    ],\n};\n\nexport const firebaseFunction = firebaseApplication(config, {\n    timeoutSeconds: 10,\n    memory: '128MB',\n});\n```\n\n## Asynchronous Server config\n```typescript\nimport { firebaseApplication, ServerConfig } from '@inpassor/firebase-application';\n\n// Some asynchronous get config function\nconst getConfig = (): Promise\u003cServerConfig\u003e =\u003e {\n    const config: ServerConfig = {}; // define your own ServerConfig here\n    return Promise.resolve(config);\n};\n\nexport const firebaseFunction = firebaseApplication(getConfig(), {\n    timeoutSeconds: 10,\n    memory: '128MB',\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finpassor%2Fts-firebase-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finpassor%2Fts-firebase-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finpassor%2Fts-firebase-application/lists"}