# @hedy-tech/fireback-https-express

> Firebase backend https plugin

Latest version **1.0.5** (published 2022-12-15) · AGPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @hedy-tech/fireback-https-express
pnpm add @hedy-tech/fireback-https-express
yarn add @hedy-tech/fireback-https-express
bun add @hedy-tech/fireback-https-express
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2022-12-15 |
| First published | 2022-12-15 |
| Weekly downloads | 0 |
| License | AGPL-3.0-or-later |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 54.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Joao Correia |
| Maintainers | techhedy |
| Keywords | Firebase, backend, https, plugin, typescript |

## Links

- npm: https://www.npmjs.com/package/@hedy-tech/fireback-https-express
- Repository: https://github.com/hedy-tech/fireback-https-express
- Homepage: https://github.com/hedy-tech/fireback-https-express#readme
- Issues: https://github.com/hedy-tech/fireback-https-express/issues
- npm.io page: https://npm.io/package/@hedy-tech/fireback-https-express

## Dependencies (11)

- [cors](https://npm.io/package/cors.md) ^2.8.5
- [busboy](https://npm.io/package/busboy.md) ^1.6.0
- [express](https://npm.io/package/express.md) ^4.18.1
- [body-parser](https://npm.io/package/body-parser.md) ^1.20.0
- [@types/busboy](https://npm.io/package/@types/busboy.md) ^1.5.0
- [cookie-parser](https://npm.io/package/cookie-parser.md) ^1.4.6
- [promise-mysql](https://npm.io/package/promise-mysql.md) ^5.2.0
- [@types/express](https://npm.io/package/@types/express.md) ^4.17.13
- [firebase-admin](https://npm.io/package/firebase-admin.md) ^10.2.0
- [firebase-functions](https://npm.io/package/firebase-functions.md) ^3.21.2
- [@types/cookie-parser](https://npm.io/package/@types/cookie-parser.md) ^1.4.3

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2022-12-15
- 1.0.4 — 2022-12-15

## README

<p align="center">
    <a href="https://travis-ci.com/github/hedy-tech/fireback-https-express"><img src="https://badgen.net/circleci/github/hedy-tech/fireback-https-express?icon=travis&label=build"/></a>
    <a href="https://www.npmjs.com/package/@hedy-tech/fireback-https-express"><img src="https://badgen.net/npm/v/@hedy-tech/fireback-https-express?icon=npm&label"/></a>
    <a href="https://www.npmjs.com/package/@hedy-tech/fireback-https-express"><img src="https://badgen.net/npm/license/@hedy-tech/fireback-https-express?icon=npm"/></a> 
    <a href="https://www.npmjs.com/package/@hedy-tech/fireback-https-express"><img src="https://badgen.net/npm/types/@hedy-tech/fireback-https-express?icon=typescript"/></a> 
</p>

<p align="center">
    <a href="https://codeclimate.com/github/hedy-tech/fireback-https-express/maintainability"><img src="https://api.codeclimate.com/v1/badges/117a9e823774831eb33e/maintainability"/></a>
    <a href="https://codeclimate.com/github/hedy-tech/fireback-https-express/test_coverage"><img src="https://api.codeclimate.com/v1/badges/117a9e823774831eb33e/test_coverage"/></a>
</p>

<p align="center">
    <a href="http://commitizen.github.io/cz-cli/"><img src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg"/></a>
    <a href="https://www.conventionalcommits.org/"><img src="https://img.shields.io/badge/conventional-commits-pink"/></a>
</p>

# Firebase Backend Https Plugin
This package aims to assist the firebase backend helper with a solution in express as the https engine. This will allow you to expose API endpoints with multiple functionality ouut of the box and allow you to add a DB middleware of your choice.

## Installation
```
yarn add @hedy-tech/fireback-https-express
```

or

```
npm install @hedy-tech/fireback-https-express
```

## Configuration
When preparing a route (entity functionality group), you will need to provide a configuuration that will be applied for all of them. This will need to follow the `ProvidedOptionsType`.

### Options
| Attribute      | Type               | Default     | Required |
| -------------- | ------------------ | ----------- | -------- |
| cors           | `boolean`          | `false`     | No       |
| allowedOrigins | `string[]`         | `undefined` | No       |
| security       | `boolean`          | `false`     | No       |
| dbMiddleware   | `MiddlewareMethod` | `undefined` | No       |

The service will apply the required rules and middlewares to add each one to it.

Security will ensure that the requesting party is authenticated and has a valid token.

Cors will only allow provided origins present in `allowedOrigins`.

If provided the service will ensure a connection pool to the database.

## Start a route
By calling `initHttpsRoute` it will return you with an express route interface with all the options applied.

This route interface will be the one to pass to fireback to be registered.

---
_Source: https://npm.io/package/@hedy-tech/fireback-https-express · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
